home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Hyper / Q-R / RPN Calculator.cpt / RPN Calculator / card_3030.txt < prev    next >
Text File  |  1988-09-16  |  79KB  |  3,572 lines

  1. -- card: 3030 from stack: in
  2. -- bmap block id: 4891
  3. -- flags: 4000
  4. -- background id: 2751
  5. -- name: Calc
  6. ----- HyperTalk script -----
  7. on opencard
  8.   global onedot
  9.   hide button "RPN Calc"
  10.   hide card field "M0"
  11.   hide card field "M9"
  12.   put empty into card field "M0"
  13.   put empty into card field "M9"
  14.   put "" into it
  15.   if card field "Name" = "" or card field "Pname" = "" then
  16.     ask "Enter your name"
  17.     if it = "" or it = " " then
  18.       go home
  19.       exit opencard
  20.     end if
  21.     put "User is: " & it into card field "Name"
  22.     put "  " & last word of it into card field "Pname"
  23.     set userlevel to 4
  24.     doMenu "Compact Stack"
  25.     set userlevel to 2
  26.   end if
  27.   hide card field "List"
  28.   hide card field "xtest"
  29.   -- RESET FOLLOWING FOR DISTRIBUTION
  30.   -- set userLevel to 2
  31.   -- hide menubar
  32.   put 0 into onedot
  33. end opencard
  34.  
  35. function tolabel L
  36. global pos
  37. put 2 into temp
  38. put field "list" of card "PG" into list
  39. put line temp of list into t
  40. repeat while t <> ""
  41.   if first char of first word of t = "#" and second char of first word of t = L then
  42.     put temp into pos
  43.     return 1
  44.   end if
  45.   add 1 to temp
  46.   put line temp of list into t
  47. end repeat
  48. return 0
  49. end tolabel
  50.  
  51. on passby
  52.   global pos
  53.   put pos + 1 into pos
  54.   put line pos of field "list" of card "PG" into temp
  55.   if temp = "GTo" or temp = "Inv" then
  56.     put pos + 1 into pos
  57.   end if
  58. end passby
  59.  
  60. function memop m
  61. global mtask, prog
  62. if prog = 1 then
  63.   put return & "'" & second char of m after last line of field "list" of card "PG"
  64. end if
  65. put 1 into r
  66. if mtask = "s" then
  67.   put line 4 of card field "Regs" into card field m
  68. else if mtask = "r" then
  69.   pushup
  70.   put card field m into line 4 of card field "Regs"
  71. else if mtask = "s+" then
  72.   add line 4 of card field "Regs" to card field m
  73. else if mtask = "c" then
  74.   put "" into card field m
  75. else
  76.   show card field m
  77.   put 0 into r
  78. end if
  79. put "" into mtask
  80. return r
  81. end memop
  82.  
  83. function fact z
  84. global nform
  85. set numberFormat to "0.000000000000000000000000"
  86. put 1 into m
  87. repeat while z > 1
  88.   put (z * m) into m
  89.   put (z - 1) into z
  90. end repeat
  91. if z < 1 then put Gm(z) * m into m
  92. set numberFormat to nform
  93. return m
  94. end fact
  95.  
  96. function Gm x  -- from "Handbook of Mathematical Functions"
  97. -- edited by M. Abramowitz and I. Segun, Dover Publ.
  98. set numberFormat to "0.000000000000000000000000"
  99. put (((((((x*.035868343 - .193527818)*x+.482199394)*x-.756704078)* x+.918206857)*x-.897056937)*x+.988205891)*x-.577191652)*x+1 into Result
  100. return Result
  101. end Gm
  102.  
  103. function hlp m
  104. if the optionKey is down then
  105.   put card field "Regs" into temp
  106.   put m into card field "Regs"
  107.   wait until the optionKey is up
  108.   put temp into card field "Regs"
  109. end if
  110. return 1
  111. end hlp
  112.  
  113. on idle
  114.   if last word of card field "Name" <> last word of card field "Pname" then
  115.     go Home
  116.   else
  117.     if the userLevel <> 5 then hide menuBar
  118.     pass idle
  119.   end if
  120. end idle
  121.  
  122.  
  123.  
  124.  
  125.  
  126. -- part 1 (button)
  127. -- low flags: 00
  128. -- high flags: 0000
  129. -- rect: left=16 top=26 right=56 bottom=53
  130. -- title width / last selected line: 0
  131. -- icon id / first selected line: 1011 / 1011
  132. -- text alignment: 1
  133. -- font id: 0
  134. -- text size: 12
  135. -- style flags: 0
  136. -- line height: 16
  137. -- part name: Home
  138. ----- HyperTalk script -----
  139. on mouseUp
  140.   visual effect iris close
  141.   go home
  142. end mouseUp
  143.  
  144.  
  145.  
  146.  
  147. -- part 2 (field)
  148. -- low flags: 00
  149. -- high flags: 0002
  150. -- rect: left=71 top=71 right=135 bottom=253
  151. -- title width / last selected line: 0
  152. -- icon id / first selected line: 0 / 0
  153. -- text alignment: 0
  154. -- font id: 3
  155. -- text size: 12
  156. -- style flags: 0
  157. -- line height: 16
  158. -- part name: Regs
  159. ----- HyperTalk script -----
  160. on mouseUp
  161.   put the mouseLoc into card field M1
  162. end mouseUp
  163.  
  164.  
  165.  
  166. -- part 3 (button)
  167. -- low flags: 00
  168. -- high flags: 0000
  169. -- rect: left=71 top=209 right=226 bottom=101
  170. -- title width / last selected line: 0
  171. -- icon id / first selected line: 0 / 0
  172. -- text alignment: 1
  173. -- font id: 0
  174. -- text size: 12
  175. -- style flags: 0
  176. -- line height: 16
  177. -- part name: '7
  178. ----- HyperTalk script -----
  179. on mouseUp
  180.   global prog
  181.   check
  182.   put "7" after last char of line 4 of card field "Regs"
  183.   if prog = 1 then
  184.     put return & "'7" after last line of field "list" of card "PG"
  185.   end if
  186. end mouseUp
  187.  
  188.  
  189.  
  190. -- part 4 (button)
  191. -- low flags: 00
  192. -- high flags: 0000
  193. -- rect: left=71 top=230 right=246 bottom=101
  194. -- title width / last selected line: 0
  195. -- icon id / first selected line: 0 / 0
  196. -- text alignment: 1
  197. -- font id: 0
  198. -- text size: 12
  199. -- style flags: 0
  200. -- line height: 16
  201. -- part name: '4
  202. ----- HyperTalk script -----
  203. on mouseUp
  204.   global prog
  205.   global mtask
  206.   if mtask <> "" then
  207.     get memop("M4")
  208.     exit mouseUp
  209.   end if
  210.   check
  211.   put "4" after last char of line 4 of card field "Regs"
  212.   if prog = 1 then
  213.     put return & "'4" after last line of field "list" of card "PG"
  214.   end if
  215. end mouseUp
  216.  
  217.  
  218.  
  219. -- part 5 (button)
  220. -- low flags: 00
  221. -- high flags: 0000
  222. -- rect: left=71 top=250 right=265 bottom=101
  223. -- title width / last selected line: 0
  224. -- icon id / first selected line: 0 / 0
  225. -- text alignment: 1
  226. -- font id: 0
  227. -- text size: 12
  228. -- style flags: 0
  229. -- line height: 16
  230. -- part name: '1
  231. ----- HyperTalk script -----
  232. on mouseUp
  233.   global prog, mtask
  234.   if mtask <> "" then
  235.     get memop("M1")
  236.     exit mouseUp
  237.   end if
  238.   check
  239.   put "1" after last char of line 4 of card field "Regs"
  240.   if prog = 1 then
  241.     put return & "'1" after last line of field "list" of card "PG"
  242.   end if
  243. end mouseUp
  244.  
  245.  
  246.  
  247. -- part 6 (button)
  248. -- low flags: 00
  249. -- high flags: 0000
  250. -- rect: left=71 top=268 right=284 bottom=101
  251. -- title width / last selected line: 0
  252. -- icon id / first selected line: 0 / 0
  253. -- text alignment: 1
  254. -- font id: 0
  255. -- text size: 12
  256. -- style flags: 0
  257. -- line height: 16
  258. -- part name: '0
  259. ----- HyperTalk script -----
  260. on mouseUp
  261.   global prog, mtask
  262.   if mtask <> "" then
  263.     get memop("M0")
  264.     exit mouseUp
  265.   end if
  266.   check
  267.   put "0" after last char in line 4 of card field "Regs"
  268.   if prog = 1 then
  269.     put return & "'0" after last line of field "list" of card "PG"
  270.   end if
  271. end mouseUp
  272.  
  273.  
  274.  
  275. -- part 7 (button)
  276. -- low flags: 00
  277. -- high flags: 0000
  278. -- rect: left=107 top=268 right=284 bottom=137
  279. -- title width / last selected line: 0
  280. -- icon id / first selected line: 0 / 0
  281. -- text alignment: 1
  282. -- font id: 0
  283. -- text size: 12
  284. -- style flags: 0
  285. -- line height: 16
  286. -- part name: .
  287. ----- HyperTalk script -----
  288. on mouseUp
  289.   global prog
  290.   check
  291.   if offset(".",line 4 of card field "Regs") = 0 then
  292.     put "." after last char of line 4 of card field "Regs"
  293.   end if
  294.   if prog = 1 then
  295.     put return & "." after last line of field "list" of card "PG"
  296.   end if
  297. end mouseUp
  298.  
  299.  
  300.  
  301. -- part 8 (button)
  302. -- low flags: 00
  303. -- high flags: 0000
  304. -- rect: left=107 top=250 right=265 bottom=137
  305. -- title width / last selected line: 0
  306. -- icon id / first selected line: 0 / 0
  307. -- text alignment: 1
  308. -- font id: 0
  309. -- text size: 12
  310. -- style flags: 0
  311. -- line height: 16
  312. -- part name: '2
  313. ----- HyperTalk script -----
  314. on mouseUp
  315.   global prog
  316.   global mtask
  317.   if mtask <> "" then
  318.     get memop("M2")
  319.     exit mouseUp
  320.   end if
  321.   check
  322.   put "2" after last char of line 4 of card field "Regs"
  323.   if prog = 1 then
  324.     put return & "'2" after last line of field "list" of card "PG"
  325.   end if
  326. end mouseUp
  327.  
  328.  
  329.  
  330. -- part 9 (button)
  331. -- low flags: 00
  332. -- high flags: 0000
  333. -- rect: left=107 top=230 right=246 bottom=137
  334. -- title width / last selected line: 0
  335. -- icon id / first selected line: 0 / 0
  336. -- text alignment: 1
  337. -- font id: 0
  338. -- text size: 12
  339. -- style flags: 0
  340. -- line height: 16
  341. -- part name: '5
  342. ----- HyperTalk script -----
  343. on mouseUp
  344.   global prog
  345.   check
  346.   put "5" after last char of line 4 of card field "Regs"
  347.   if prog = 1 then
  348.     put return & "'5" after last line of field "list" of card "PG"
  349.   end if
  350. end mouseUp
  351.  
  352.  
  353.  
  354. -- part 10 (button)
  355. -- low flags: 00
  356. -- high flags: 0000
  357. -- rect: left=107 top=209 right=226 bottom=137
  358. -- title width / last selected line: 0
  359. -- icon id / first selected line: 0 / 0
  360. -- text alignment: 1
  361. -- font id: 0
  362. -- text size: 12
  363. -- style flags: 0
  364. -- line height: 16
  365. -- part name: '8
  366. ----- HyperTalk script -----
  367. on mouseUp
  368.   global prog
  369.   check
  370.   put "8" after last char of line 4 of card field "Regs"
  371.   if prog = 1 then
  372.     put return & "'8" after last line of field "list" of card "PG"
  373.   end if
  374. end mouseUp
  375.  
  376.  
  377.  
  378. -- part 11 (button)
  379. -- low flags: 00
  380. -- high flags: 0000
  381. -- rect: left=142 top=209 right=226 bottom=172
  382. -- title width / last selected line: 0
  383. -- icon id / first selected line: 0 / 0
  384. -- text alignment: 1
  385. -- font id: 0
  386. -- text size: 12
  387. -- style flags: 0
  388. -- line height: 16
  389. -- part name: '9
  390. ----- HyperTalk script -----
  391. on mouseUp
  392.   global prog, mtask
  393.   if mtask <> "" then
  394.     get memop("M9")
  395.     exit mouseUp
  396.   end if
  397.   check
  398.   put "9" after last char of line 4 of card field "Regs"
  399.   if prog = 1 then
  400.     put return & "'9" after last line of field "list" of card "PG"
  401.   end if
  402. end mouseUp
  403.  
  404.  
  405.  
  406. -- part 12 (button)
  407. -- low flags: 00
  408. -- high flags: 0000
  409. -- rect: left=142 top=230 right=246 bottom=172
  410. -- title width / last selected line: 0
  411. -- icon id / first selected line: 0 / 0
  412. -- text alignment: 1
  413. -- font id: 0
  414. -- text size: 12
  415. -- style flags: 0
  416. -- line height: 16
  417. -- part name: '6
  418. ----- HyperTalk script -----
  419. on mouseUp
  420.   global prog
  421.   check
  422.   put "6" after last char of line 4 of card field "Regs"
  423.   if prog = 1 then
  424.     put return & "'6" after last line of field "list" of card "PG"
  425.   end if
  426. end mouseUp
  427.  
  428.  
  429.  
  430. -- part 13 (button)
  431. -- low flags: 00
  432. -- high flags: 0000
  433. -- rect: left=142 top=250 right=265 bottom=172
  434. -- title width / last selected line: 0
  435. -- icon id / first selected line: 0 / 0
  436. -- text alignment: 1
  437. -- font id: 0
  438. -- text size: 12
  439. -- style flags: 0
  440. -- line height: 16
  441. -- part name: '3
  442. ----- HyperTalk script -----
  443. on mouseUp
  444.   global prog
  445.   global mtask
  446.   if mtask <> "" then
  447.     get memop("M3")
  448.     exit mouseUp
  449.   end if
  450.   check
  451.   put "3" after last char of line 4 of card field "Regs"
  452.   if prog = 1 then
  453.     put return & "'3" after last line of field "list" of card "PG"
  454.   end if
  455. end mouseUp
  456.  
  457.  
  458.  
  459. -- part 14 (button)
  460. -- low flags: 00
  461. -- high flags: 8004
  462. -- rect: left=142 top=268 right=285 bottom=182
  463. -- title width / last selected line: 0
  464. -- icon id / first selected line: 0 / 0
  465. -- text alignment: 1
  466. -- font id: 0
  467. -- text size: 12
  468. -- style flags: 0
  469. -- line height: 16
  470. -- part name: E
  471. ----- HyperTalk script -----
  472. on mouseUp
  473.   global flag
  474.   global prog
  475.   if prog = 1 then
  476.     put return & "E" after last line of field "list" of card "PG"
  477.   end if
  478.   if flag = 1 then
  479.     pushup
  480.     put line 3 of card field "Regs" into line 4 of card field "Regs"
  481.   end if
  482.   put 1 into flag
  483. end mouseUp
  484.  
  485. on mouseWithin
  486.   get hlp("Enters a value into the x register so that the next value" & " will lift the stack.")
  487. end mouseWithin
  488.  
  489.  
  490. -- part 15 (button)
  491. -- low flags: 00
  492. -- high flags: 8004
  493. -- rect: left=189 top=250 right=267 bottom=219
  494. -- title width / last selected line: 0
  495. -- icon id / first selected line: 0 / 0
  496. -- text alignment: 1
  497. -- font id: 0
  498. -- text size: 12
  499. -- style flags: 0
  500. -- line height: 16
  501. -- part name: +
  502. ----- HyperTalk script -----
  503. on mouseUp
  504.   global nform
  505.   global prog
  506.   if prog = 1 then
  507.     put return & "+" after last line of field "list" of card "PG"
  508.   end if
  509.   set numberFormat to "0.000000000000000000000000"
  510.   put line 3 of card field "Regs" + line 4 of card field "Regs" into r
  511.   set numberFormat to nform
  512.   put r into line 4 of card field "Regs"
  513.   funcdrop
  514. end mouseUp
  515.  
  516. on mouseWithin
  517.   get hlp("Adds y to x.")
  518. end mouseWithin
  519.  
  520.  
  521. -- part 16 (button)
  522. -- low flags: 00
  523. -- high flags: 8004
  524. -- rect: left=189 top=229 right=247 bottom=219
  525. -- title width / last selected line: 0
  526. -- icon id / first selected line: 0 / 0
  527. -- text alignment: 1
  528. -- font id: 0
  529. -- text size: 12
  530. -- style flags: 0
  531. -- line height: 16
  532. -- part name: -
  533. ----- HyperTalk script -----
  534. on mouseUp
  535.   global nform
  536.   global prog
  537.   if prog = 1 then
  538.     put return & "-" after last line of field "list" of card "PG"
  539.   end if
  540.   set numberFormat to "0.000000000000000000000000"
  541.   put line 3 of card field "Regs" - line 4 of card field "Regs" into r
  542.   set numberFormat to nform
  543.   put r into line 4 of card field "Regs"
  544.   funcdrop
  545. end mouseUp
  546.  
  547. on mouseWithin
  548.   get hlp("Subtracts x from y.")
  549. end mouseWithin
  550.  
  551.  
  552. -- part 17 (button)
  553. -- low flags: 00
  554. -- high flags: 8004
  555. -- rect: left=189 top=208 right=226 bottom=219
  556. -- title width / last selected line: 0
  557. -- icon id / first selected line: 0 / 0
  558. -- text alignment: 1
  559. -- font id: 0
  560. -- text size: 12
  561. -- style flags: 0
  562. -- line height: 16
  563. -- part name: *
  564. ----- HyperTalk script -----
  565. on mouseUp
  566.   global nform
  567.   global prog
  568.   if prog = 1 then
  569.     put return & "*" after last line of field "list" of card "PG"
  570.   end if
  571.   set numberFormat to "0.000000000000000000000000"
  572.   put line 4 of card field "Regs" * line 3 of card field "Regs" into r
  573.   set numberFormat to nform
  574.   put r into line 4 of card field "Regs"
  575.   funcdrop
  576. end mouseUp
  577.  
  578. on mouseWithin
  579.   get hlp("Multiplies x by y.")
  580. end mouseWithin
  581.  
  582.  
  583. -- part 18 (button)
  584. -- low flags: 00
  585. -- high flags: 8004
  586. -- rect: left=188 top=187 right=205 bottom=218
  587. -- title width / last selected line: 0
  588. -- icon id / first selected line: 0 / 0
  589. -- text alignment: 1
  590. -- font id: 0
  591. -- text size: 12
  592. -- style flags: 256
  593. -- line height: 16
  594. -- part name: ÷
  595. ----- HyperTalk script -----
  596. on mouseUp
  597.   global nform
  598.   global prog
  599.   global error
  600.   if prog = 1 then
  601.     put return & "√∑" after last line of field "list" of card "PG"
  602.   end if
  603.   if line 4 of card field "Regs" <> 0  and line 4 of card field "Regs" <> "" then
  604.     set numberFormat to "0.000000000000000000000000"
  605.     put line 3 of card field "Regs" / line 4 of card field "Regs" into r
  606.     set numberFormat to nform
  607.     put r into line 4 of card field "Regs"
  608.     funcdrop
  609.   else
  610.     put 1 into error
  611.     beep
  612.   end if
  613. end mouseUp
  614.  
  615. on mouseWithin
  616.   get hlp("Divides y by x.")
  617. end mouseWithin
  618.  
  619.  
  620.  
  621. -- part 19 (button)
  622. -- low flags: 00
  623. -- high flags: 8004
  624. -- rect: left=188 top=166 right=184 bottom=218
  625. -- title width / last selected line: 0
  626. -- icon id / first selected line: 0 / 0
  627. -- text alignment: 1
  628. -- font id: 0
  629. -- text size: 12
  630. -- style flags: 256
  631. -- line height: 16
  632. -- part name: √
  633. ----- HyperTalk script -----
  634. on mouseUp
  635.   global flag
  636.   global nform
  637.   global prog
  638.   global error
  639.   if prog = 1 then
  640.     put return & "‚àö" after last line of field "list" of card "PG"
  641.   end if
  642.   if line 4 of card field "Regs" >= 0 then
  643.     set numberFormat to "0.000000000000000000000000"
  644.     put sqrt(line 4 of card field "Regs") into r
  645.     set numberFormat to nform
  646.     put r into line 4 of card field "Regs"
  647.   else
  648.     put 1 into error
  649.     beep
  650.   end if
  651.   put 1 into flag
  652. end mouseUp
  653.  
  654. on mouseWithin
  655.   get hlp("Puts square root of x into x.")
  656. end mouseWithin
  657.  
  658.  
  659.  
  660. -- part 20 (button)
  661. -- low flags: 00
  662. -- high flags: 8004
  663. -- rect: left=260 top=230 right=248 bottom=292
  664. -- title width / last selected line: 0
  665. -- icon id / first selected line: 0 / 0
  666. -- text alignment: 1
  667. -- font id: 0
  668. -- text size: 12
  669. -- style flags: 0
  670. -- line height: 16
  671. -- part name: Rdn
  672. ----- HyperTalk script -----
  673. on mouseUp
  674.   global prog
  675.   global flag
  676.   if prog = 1 then
  677.     put return & "Rdn" after last line of field "list" of card "PG"
  678.   end if
  679.   put line 4 of card field "Regs" into temp
  680.   delete line 4 of card field "Regs"
  681.   put return before first char of line 1 of card field "Regs"
  682.   put temp into line 1 of card field "Regs"
  683.   put 1 into flag
  684. end mouseUp
  685.  
  686. on mouseWithin
  687.   get hlp("Rolls calculator stack down, with x --> t")
  688. end mouseWithin
  689.  
  690.  
  691. -- part 21 (button)
  692. -- low flags: 00
  693. -- high flags: 8004
  694. -- rect: left=260 top=187 right=205 bottom=292
  695. -- title width / last selected line: 0
  696. -- icon id / first selected line: 0 / 0
  697. -- text alignment: 1
  698. -- font id: 0
  699. -- text size: 12
  700. -- style flags: 0
  701. -- line height: 16
  702. -- part name: x-y
  703. ----- HyperTalk script -----
  704. on mouseUp
  705.   global prog
  706.   global flag
  707.   if prog = 1 then
  708.     put return & "x-y" after last line of field "list" of card "PG"
  709.   end if
  710.   put line 4 of card field "Regs" into temp
  711.   put line 3 of card field "Regs" into line 4 of card field "Regs"
  712.   put temp into line 3 of card field "Regs"
  713.   put 1 into flag
  714. end mouseUp
  715.  
  716. on mouseWithin
  717.   get hlp("Exchanges the values in the x and y registers.")
  718. end mouseWithin
  719.  
  720.  
  721.  
  722. -- part 22 (button)
  723. -- low flags: 00
  724. -- high flags: 8004
  725. -- rect: left=224 top=269 right=286 bottom=254
  726. -- title width / last selected line: 0
  727. -- icon id / first selected line: 0 / 0
  728. -- text alignment: 1
  729. -- font id: 0
  730. -- text size: 12
  731. -- style flags: 0
  732. -- line height: 16
  733. -- part name: clrx
  734. ----- HyperTalk script -----
  735. on mouseUp
  736.   global prog
  737.   if prog = 1 then
  738.     put return & "clrx" after last line of field "list" of card "PG"
  739.   end if
  740.   put "" into line 4 of card field "Regs"
  741. end mouseUp
  742.  
  743. on mouseWithin
  744.   get hlp("Clears only the x register.")
  745. end mouseWithin
  746.  
  747.  
  748.  
  749. -- part 23 (button)
  750. -- low flags: 00
  751. -- high flags: 8004
  752. -- rect: left=398 top=145 right=163 bottom=429
  753. -- title width / last selected line: 0
  754. -- icon id / first selected line: 0 / 0
  755. -- text alignment: 1
  756. -- font id: 0
  757. -- text size: 12
  758. -- style flags: 0
  759. -- line height: 16
  760. -- part name: R-D
  761. ----- HyperTalk script -----
  762. on mouseUp
  763.   global flag
  764.   global nform
  765.   global prog
  766.   if prog = 1 then
  767.     put return & "R-D" after last line of field "list" of card "PG"
  768.   end if
  769.   set numberFormat to "0.000000000000000000000000"
  770.   put line 4 of card field "Regs" * 180 / pi into r
  771.   set numberFormat to nform
  772.   put r into line 4 of card field "Regs"
  773.   put 1 into flag
  774. end mouseUp
  775.  
  776. on mouseWithin
  777.   get hlp("Assumes x is in radians and converts to degrees.")
  778. end mouseWithin
  779.  
  780.  
  781.  
  782. -- part 24 (button)
  783. -- low flags: 00
  784. -- high flags: 8004
  785. -- rect: left=260 top=145 right=163 bottom=291
  786. -- title width / last selected line: 0
  787. -- icon id / first selected line: 0 / 0
  788. -- text alignment: 1
  789. -- font id: 0
  790. -- text size: 12
  791. -- style flags: 0
  792. -- line height: 16
  793. -- part name: inv
  794. ----- HyperTalk script -----
  795. on mouseUp
  796.   global prog
  797.   global invflg
  798.   if prog = 1 then
  799.     put return & "inv" after last line of field "list" of card "PG"
  800.   end if
  801.   put 1 into invflg
  802.   show button "I"
  803. end mouseUp
  804.  
  805. on mouseWithin
  806.   get hlp("Sets up for inverse function of buttons in striped areas.")
  807. end mouseWithin
  808.  
  809.  
  810. -- part 25 (button)
  811. -- low flags: 00
  812. -- high flags: 8004
  813. -- rect: left=295 top=145 right=163 bottom=326
  814. -- title width / last selected line: 0
  815. -- icon id / first selected line: 0 / 0
  816. -- text alignment: 1
  817. -- font id: 0
  818. -- text size: 12
  819. -- style flags: 0
  820. -- line height: 16
  821. -- part name: sin
  822. ----- HyperTalk script -----
  823. on mouseUp
  824.   global invflg
  825.   global flag
  826.   global aflag
  827.   global Result
  828.   global nform
  829.   global tmode
  830.   global prog
  831.   global error
  832.   if prog = 1 then
  833.     put return & "sin" after last line of field "list" of card "PG"
  834.   end if
  835.   set numberFormat to "0.000000000000000000000000"
  836.   if tmode = "deg" then
  837.     put line 4 of card field "Regs" * pi / 180 into ang
  838.   else
  839.     put line 4 of card field "Regs" into ang
  840.   end if
  841.   if invflg = 0 then
  842.     if tmode = "deg" then
  843.       put line 4 of card field "Regs" * pi / 180 into ang
  844.     else
  845.       put line 4 of card field "Regs" into ang
  846.     end if
  847.     put sin(ang) into r
  848.     set numberFormat to nform
  849.     put r into line 4 of card field "Regs"
  850.   else
  851.     put 0 into aflag
  852.     put line 4 of card field "Regs" into temp
  853.     if temp = "" or abs(temp) > 1 then
  854.       beep
  855.       put 1 into error
  856.       exit mouseUp
  857.     end if
  858.     arcsin
  859.     put Result into ang
  860.     if tmode = "deg" then
  861.       put ang * 180 / pi into r
  862.     else
  863.       put ang into r
  864.     end if
  865.     set numberFormat to nform
  866.     put r into line 4 of card field "Regs"
  867.   end if
  868.   put 1 into flag
  869.   put 0 into invflg
  870.   hide button "I"
  871. end mouseUp
  872.  
  873. on mouseWithin
  874.   get hlp("Sin of value in x, or arcsin if inv set.")
  875. end mouseWithin
  876.  
  877.  
  878.  
  879. -- part 26 (field)
  880. -- low flags: 81
  881. -- high flags: 0002
  882. -- rect: left=259 top=118 right=135 bottom=441
  883. -- title width / last selected line: 0
  884. -- icon id / first selected line: 0 / 0
  885. -- text alignment: 0
  886. -- font id: 3
  887. -- text size: 12
  888. -- style flags: 0
  889. -- line height: 16
  890. -- part name: M1
  891. ----- HyperTalk script -----
  892. on mouseUp
  893.   hide card field "M1"
  894.   hide card field "M2"
  895.   hide card field "M3"
  896.   hide card field "M4"
  897. end mouseUp
  898.  
  899.  
  900.  
  901.  
  902. -- part 27 (field)
  903. -- low flags: 81
  904. -- high flags: 0002
  905. -- rect: left=259 top=102 right=119 bottom=441
  906. -- title width / last selected line: 0
  907. -- icon id / first selected line: 0 / 0
  908. -- text alignment: 0
  909. -- font id: 3
  910. -- text size: 12
  911. -- style flags: 0
  912. -- line height: 16
  913. -- part name: M2
  914. ----- HyperTalk script -----
  915. on mouseUp
  916.   hide card field "M2"
  917.   hide card field "M3"
  918.   hide card field "M4"
  919. end mouseUp
  920.  
  921.  
  922.  
  923. -- part 28 (field)
  924. -- low flags: 81
  925. -- high flags: 0002
  926. -- rect: left=259 top=86 right=103 bottom=441
  927. -- title width / last selected line: 0
  928. -- icon id / first selected line: 0 / 0
  929. -- text alignment: 0
  930. -- font id: 3
  931. -- text size: 12
  932. -- style flags: 0
  933. -- line height: 16
  934. -- part name: M3
  935. ----- HyperTalk script -----
  936. on mouseUp
  937.   hide card field "M3"
  938.   hide card field "M4"
  939. end mouseUp
  940.  
  941.  
  942.  
  943. -- part 30 (button)
  944. -- low flags: 00
  945. -- high flags: 8004
  946. -- rect: left=223 top=145 right=163 bottom=254
  947. -- title width / last selected line: 0
  948. -- icon id / first selected line: 0 / 0
  949. -- text alignment: 1
  950. -- font id: 0
  951. -- text size: 12
  952. -- style flags: 0
  953. -- line height: 16
  954. -- part name: chs
  955. ----- HyperTalk script -----
  956. on mouseUp
  957.   global flag
  958.   global nform
  959.   global prog
  960.   if prog = 1 then
  961.     put return & "chs" after last line of field "list" of card "PG"
  962.   end if
  963.   set numberFormat to nform
  964.   put - line 4 of card field "Regs" into line 4 of card field "Regs"
  965.   put 1 into flag
  966. end mouseUp
  967.  
  968. on mouseWithin
  969.   get hlp("Changes the sign of the value in x.")
  970. end mouseWithin
  971.  
  972.  
  973. -- part 31 (button)
  974. -- low flags: 00
  975. -- high flags: 8004
  976. -- rect: left=296 top=187 right=204 bottom=327
  977. -- title width / last selected line: 0
  978. -- icon id / first selected line: 0 / 0
  979. -- text alignment: 1
  980. -- font id: 0
  981. -- text size: 12
  982. -- style flags: 0
  983. -- line height: 16
  984. -- part name: Ln
  985. ----- HyperTalk script -----
  986. on mouseUp
  987.   global flag
  988.   global nform
  989.   global prog
  990.   global error
  991.   if prog = 1 then
  992.     put return & "Ln" after last line of field "list" of card "PG"
  993.   end if
  994.   if line 4 of card field "Regs" <> "" and line 4 of card field "Regs" <> 0 then
  995.     set numberFormat to "0.000000000000000000000000"
  996.     put ln(line 4 of card field "Regs") into r
  997.     set numberFormat to nform
  998.     put r into line 4 of card field "Regs"
  999.   else
  1000.     put 1 into error
  1001.     beep
  1002.   end if
  1003.   put 1 into flag
  1004. end mouseUp
  1005.  
  1006. on mouseWithin
  1007.   get hlp("Natural log of x")
  1008. end mouseWithin
  1009.  
  1010.  
  1011.  
  1012.  
  1013. -- part 32 (button)
  1014. -- low flags: 00
  1015. -- high flags: 8004
  1016. -- rect: left=329 top=145 right=163 bottom=360
  1017. -- title width / last selected line: 0
  1018. -- icon id / first selected line: 0 / 0
  1019. -- text alignment: 1
  1020. -- font id: 0
  1021. -- text size: 12
  1022. -- style flags: 0
  1023. -- line height: 16
  1024. -- part name: cos
  1025. ----- HyperTalk script -----
  1026. on mouseUp
  1027.   global flag
  1028.   global aflag
  1029.   global invflg
  1030.   global nform
  1031.   global Result
  1032.   global tmode
  1033.   global prog
  1034.   global error
  1035.   if prog = 1 then
  1036.     put return & "cos" after last line of field "list" of card "PG"
  1037.   end if
  1038.   set numberFormat to "0.000000000000000000000000"
  1039.   if invflg = 0 then
  1040.     if tmode = "deg" then
  1041.       put line 4 of card field "Regs" * pi / 180 into ang
  1042.     else
  1043.       put line 4 of card field "Regs" into ang
  1044.     end if
  1045.     put cos(ang) into r
  1046.     set numberFormat to nform
  1047.     put r into line 4 of card field "Regs"
  1048.   else
  1049.     put 1 into aflag
  1050.     put line 4 of card field "Regs" into temp
  1051.     if temp = "" or abs(temp) > 1 then
  1052.       put 1 into error
  1053.       beep
  1054.       exit mouseUp
  1055.     end if
  1056.     arcsin
  1057.     put Result into ang
  1058.     if tmode = "deg" then
  1059.       put ang * 180 / pi into r
  1060.     else
  1061.       put ang into r
  1062.     end if
  1063.     set numberFormat to nform
  1064.     put r into line 4 of card field "Regs"
  1065.   end if
  1066.   put 1 into flag
  1067.   put 0 into invflg
  1068.   hide button "I"
  1069. end mouseUp
  1070.  
  1071. on mouseWithin
  1072.   get hlp("cos of value in x, or arccos if inv flag set.")
  1073. end mouseWithin
  1074.  
  1075.  
  1076.  
  1077. -- part 33 (button)
  1078. -- low flags: 00
  1079. -- high flags: 8004
  1080. -- rect: left=433 top=187 right=205 bottom=464
  1081. -- title width / last selected line: 0
  1082. -- icon id / first selected line: 0 / 0
  1083. -- text alignment: 1
  1084. -- font id: 0
  1085. -- text size: 12
  1086. -- style flags: 0
  1087. -- line height: 16
  1088. -- part name: log
  1089. ----- HyperTalk script -----
  1090. on mouseUp
  1091.   global flag
  1092.   global nform
  1093.   global prog
  1094.   global error
  1095.   if prog = 1 then
  1096.     put return & "log" after last line of field "list" of card "PG"
  1097.   end if
  1098.   if line 4 of card field "Regs" <> "" and line 4 of card field "Regs" <> 0 then
  1099.     set numberFormat to "0.000000000000000000000000"
  1100.     put ln(line 4 of card field "Regs")*.43429448190325182765 into r
  1101.     set numberFormat to nform
  1102.     put r into line 4 of card field "Regs"
  1103.   else
  1104.     put 1 into error
  1105.     beep
  1106.   end if
  1107.   put 1 into flag
  1108. end mouseUp
  1109.  
  1110. on mouseWithin
  1111.   get hlp("Log to the base 10 of the value in x.")
  1112. end mouseWithin
  1113.  
  1114.  
  1115.  
  1116.  
  1117. -- part 34 (button)
  1118. -- low flags: 00
  1119. -- high flags: 8004
  1120. -- rect: left=432 top=145 right=163 bottom=462
  1121. -- title width / last selected line: 0
  1122. -- icon id / first selected line: 0 / 0
  1123. -- text alignment: 1
  1124. -- font id: 0
  1125. -- text size: 12
  1126. -- style flags: 0
  1127. -- line height: 16
  1128. -- part name: D-R
  1129. ----- HyperTalk script -----
  1130. on mouseUp
  1131.   global flag
  1132.   global nform
  1133.   global prog
  1134.   if prog = 1 then
  1135.     put return & "D-R" after last line of field "list" of card "PG"
  1136.   end if
  1137.   set numberFormat to "0.000000000000000000000000"
  1138.   put line 4 of card field "Regs" * pi / 180 into r
  1139.   set numberFormat to nform
  1140.   put r into line 4 of card field "Regs"
  1141.   put 1 into flag
  1142. end mouseUp
  1143.  
  1144. on mouseWithin
  1145.   get hlp("Assumes x is in degrees and converts to radians.")
  1146. end mouseWithin
  1147.  
  1148.  
  1149.  
  1150. -- part 35 (button)
  1151. -- low flags: 00
  1152. -- high flags: 8004
  1153. -- rect: left=329 top=187 right=205 bottom=360
  1154. -- title width / last selected line: 0
  1155. -- icon id / first selected line: 0 / 0
  1156. -- text alignment: 1
  1157. -- font id: 0
  1158. -- text size: 12
  1159. -- style flags: 0
  1160. -- line height: 16
  1161. -- part name: exp
  1162. ----- HyperTalk script -----
  1163. on mouseUp
  1164.   global flag
  1165.   global nform
  1166.   global prog
  1167.   if prog = 1 then
  1168.     put return & "exp" after last line of field "list" of card "PG"
  1169.   end if
  1170.   set numberFormat to "0.000000000000000000000000"
  1171.   put exp(line 4 of card field "Regs") into r
  1172.   set numberFormat to nform
  1173.   put r into line 4 of card field "Regs"
  1174.   put 1 into flag
  1175. end mouseUp
  1176.  
  1177. on mouseWithin
  1178.   get hlp("Calculates e to the power in x")
  1179. end mouseWithin
  1180.  
  1181.  
  1182.  
  1183. -- part 36 (button)
  1184. -- low flags: 00
  1185. -- high flags: 8004
  1186. -- rect: left=363 top=145 right=163 bottom=394
  1187. -- title width / last selected line: 0
  1188. -- icon id / first selected line: 0 / 0
  1189. -- text alignment: 1
  1190. -- font id: 0
  1191. -- text size: 12
  1192. -- style flags: 0
  1193. -- line height: 16
  1194. -- part name: tan
  1195. ----- HyperTalk script -----
  1196. on mouseUp
  1197.   global flag
  1198.   global invflg
  1199.   global nform
  1200.   global tmode
  1201.   global prog
  1202.   if prog = 1 then
  1203.     put return & "tan" after last line of field "list" of card "PG"
  1204.   end if
  1205.   set numberFormat to "0.000000000000000000000000"
  1206.   if invflg = 0 then
  1207.     if tmode = "deg" then
  1208.       put line 4 of card field "Regs" * pi / 180 into ang
  1209.     else
  1210.       put line 4 of card field "Regs" into ang
  1211.     end if
  1212.     put sin(ang) into t1
  1213.     put cos(ang) into t2
  1214.     put t1/t2 into r
  1215.     set numberFormat to nform
  1216.     put r into line 4 of card field "Regs"
  1217.   else
  1218.     put atan(line 4 of card field "Regs") into ang
  1219.     if tmode = "deg" then
  1220.       put ang * 180 / pi into r
  1221.     else
  1222.       put ang into r
  1223.     end if
  1224.     set numberFormat to nform
  1225.     put r into line 4 of card field "Regs"
  1226.   end if
  1227.   put 1 into flag
  1228.   put 0 into invflg
  1229.   hide button "I"
  1230. end mouseUp
  1231.  
  1232. on mouseWithin
  1233.   get hlp("tan of value in x, or arctan if inv flag set.")
  1234. end mouseWithin
  1235.  
  1236.  
  1237.  
  1238. -- part 37 (button)
  1239. -- low flags: 00
  1240. -- high flags: 8004
  1241. -- rect: left=466 top=187 right=205 bottom=495
  1242. -- title width / last selected line: 0
  1243. -- icon id / first selected line: 0 / 0
  1244. -- text alignment: 1
  1245. -- font id: 0
  1246. -- text size: 12
  1247. -- style flags: 0
  1248. -- line height: 16
  1249. -- part name: alg
  1250. ----- HyperTalk script -----
  1251. on mouseUp
  1252.   global flag
  1253.   global nform
  1254.   global prog
  1255.   if prog = 1 then
  1256.     put return & "alog" after last line of field "list" of card "PG"
  1257.   end if
  1258.   set numberFormat to "0.000000000000000000000000"
  1259.   put exp(line 4 of card field "Regs" / .43429448190325182765) into r
  1260.   set numberFormat to nform
  1261.   put r into line 4 of card field "Regs"
  1262.   put 1 into flag
  1263. end mouseUp
  1264.  
  1265. on mouseWithin
  1266.   get hlp("Calculates 10 to the power in x.")
  1267. end mouseWithin
  1268.  
  1269.  
  1270.  
  1271. -- part 38 (button)
  1272. -- low flags: 00
  1273. -- high flags: 8004
  1274. -- rect: left=223 top=166 right=184 bottom=254
  1275. -- title width / last selected line: 0
  1276. -- icon id / first selected line: 0 / 0
  1277. -- text alignment: 1
  1278. -- font id: 0
  1279. -- text size: 12
  1280. -- style flags: 0
  1281. -- line height: 16
  1282. -- part name: 1/x
  1283. ----- HyperTalk script -----
  1284. on mouseUp
  1285.   global flag
  1286.   global nform
  1287.   global prog
  1288.   global error
  1289.   if prog = 1 then
  1290.     put return & "1/x" after last line of field "list" of card "PG"
  1291.   end if
  1292.   set numberFormat to nform
  1293.   if line 4 of card field "Regs" <> "" and line 4 of card field "Regs" <> 0 then
  1294.     set numberFormat to "0.000000000000000000000000"
  1295.     put 1.0 / line 4 of card field "Regs" into r
  1296.     set numberFormat to nform
  1297.     put r into line 4 of card field "Regs"
  1298.   else
  1299.     put 1 into error
  1300.     beep
  1301.   end if
  1302.   put 1 into flag
  1303. end mouseUp
  1304.  
  1305. on mouseWithin
  1306.   get hlp("Puts the inverse of x into x.")
  1307. end mouseWithin
  1308.  
  1309.  
  1310.  
  1311. -- part 41 (button)
  1312. -- low flags: 00
  1313. -- high flags: 0006
  1314. -- rect: left=472 top=67 right=79 bottom=489
  1315. -- title width / last selected line: 0
  1316. -- icon id / first selected line: 0 / 0
  1317. -- text alignment: 1
  1318. -- font id: 0
  1319. -- text size: 12
  1320. -- style flags: 0
  1321. -- line height: 16
  1322. -- part name: Show Registers
  1323. ----- HyperTalk script -----
  1324. on mouseUp
  1325.   show card field "Regs"
  1326.   show card field "M1"
  1327.   show card field "M2"
  1328.   show card field "M3"
  1329.   show card field "M4"
  1330.   if the commandKey is Down then
  1331.     show card field "M0"
  1332.     show card field "M9"
  1333.   end if
  1334. end mouseUp
  1335.  
  1336. on mouseWithin
  1337.   get hlp("Shows stack and memory registers. " & "Press cmd key to also show plot min max registers")
  1338. end mouseWithin
  1339.  
  1340.  
  1341.  
  1342. -- part 47 (button)
  1343. -- low flags: 00
  1344. -- high flags: 8004
  1345. -- rect: left=71 top=188 right=205 bottom=103
  1346. -- title width / last selected line: 0
  1347. -- icon id / first selected line: 0 / 0
  1348. -- text alignment: 1
  1349. -- font id: 0
  1350. -- text size: 12
  1351. -- style flags: 0
  1352. -- line height: 16
  1353. -- part name: Sto
  1354. ----- HyperTalk script -----
  1355. on mouseUp
  1356.   global flag
  1357.   global prog
  1358.   global mtask
  1359.   if prog = 1 then
  1360.     put return & "Sto" after last line of field "list" of card "PG"
  1361.   end if
  1362.   put "s" into mtask
  1363.   put 1 into flag
  1364. end mouseUp
  1365.  
  1366. on mouseWithin
  1367.   get hlp("Stores x into memory n, " & "where n is number key [1-4] clicked after Sto.")
  1368. end mouseWithin
  1369.  
  1370.  
  1371. -- part 48 (button)
  1372. -- low flags: 00
  1373. -- high flags: 8004
  1374. -- rect: left=188 top=145 right=163 bottom=218
  1375. -- title width / last selected line: 0
  1376. -- icon id / first selected line: 0 / 0
  1377. -- text alignment: 1
  1378. -- font id: 0
  1379. -- text size: 12
  1380. -- style flags: 0
  1381. -- line height: 16
  1382. -- part name: x^2
  1383. ----- HyperTalk script -----
  1384. on mouseUp
  1385.   global flag
  1386.   global nform
  1387.   global prog
  1388.   if prog = 1 then
  1389.     put return & "x^2" after last line of field "list" of card "PG"
  1390.   end if
  1391.   if line 4 of card field "Regs" <> "" then
  1392.     set numberFormat to "0.000000000000000000000000"
  1393.     put line 4 of card field "Regs" * line 4 of card field "Regs" into r
  1394.     set numberFormat to nform
  1395.     put r into line 4 of card field "Regs"
  1396.   end if
  1397.   put 1 into flag
  1398. end mouseUp
  1399.  
  1400. on mouseWithin
  1401.   get hlp("Puts square of x into x.")
  1402. end mouseWithin
  1403.  
  1404.  
  1405. -- part 49 (button)
  1406. -- low flags: 00
  1407. -- high flags: 8004
  1408. -- rect: left=142 top=166 right=183 bottom=173
  1409. -- title width / last selected line: 0
  1410. -- icon id / first selected line: 0 / 0
  1411. -- text alignment: 1
  1412. -- font id: 0
  1413. -- text size: 12
  1414. -- style flags: 256
  1415. -- line height: 16
  1416. -- part name: %
  1417. ----- HyperTalk script -----
  1418. on mouseUp
  1419.   global flag
  1420.   global prog
  1421.   global nform
  1422.   global error
  1423.   if prog = 1 then
  1424.     put return & "%" after last line of field "list" of card "PG"
  1425.   end if
  1426.   set numberFormat to "0.000000000000000000000000"
  1427.   put line 3 of card field "Regs" * line 4 of card field "Regs" into r
  1428.   put r / 100 into r
  1429.   set numberFormat to nform
  1430.   put r into line 4 of card field "Regs"
  1431.   put 1 into flag
  1432. end mouseUp
  1433.  
  1434. on mouseWithin
  1435.   get hlp("Puts x% of y into x.")
  1436. end mouseWithin
  1437.  
  1438.  
  1439. -- part 50 (button)
  1440. -- low flags: 00
  1441. -- high flags: 8004
  1442. -- rect: left=107 top=188 right=205 bottom=139
  1443. -- title width / last selected line: 0
  1444. -- icon id / first selected line: 0 / 0
  1445. -- text alignment: 1
  1446. -- font id: 0
  1447. -- text size: 12
  1448. -- style flags: 0
  1449. -- line height: 16
  1450. -- part name: Sto+
  1451. ----- HyperTalk script -----
  1452. on mouseUp
  1453.   global flag
  1454.   global prog
  1455.   global mtask
  1456.   if prog = 1 then
  1457.     put return & "Sto+" after last line of field "list" of card "PG"
  1458.   end if
  1459.   put "s+" into mtask
  1460.   put 1 into flag
  1461. end mouseUp
  1462.  
  1463. on mouseWithin
  1464.   get hlp("Add x to memory n, " & "where n [1-4] is number clicked after Sto+.")
  1465. end mouseWithin
  1466.  
  1467.  
  1468. -- part 52 (button)
  1469. -- low flags: 00
  1470. -- high flags: 8004
  1471. -- rect: left=260 top=209 right=226 bottom=292
  1472. -- title width / last selected line: 0
  1473. -- icon id / first selected line: 0 / 0
  1474. -- text alignment: 1
  1475. -- font id: 0
  1476. -- text size: 12
  1477. -- style flags: 0
  1478. -- line height: 16
  1479. -- part name: Rup
  1480. ----- HyperTalk script -----
  1481. on mouseUp
  1482.   global flag
  1483.   global prog
  1484.   if prog = 1 then
  1485.     put return & "Rup" after last line of field "list" of card "PG"
  1486.   end if
  1487.   put line 1 of card field "Regs" into temp
  1488.   pushup
  1489.   put temp into line 4 of card field "Regs"
  1490.   put 1 into flag
  1491. end mouseUp
  1492.  
  1493. on mouseWithin
  1494.   get hlp("Rolls calculator stack up, with t --> x.")
  1495. end mouseWithin
  1496.  
  1497.  
  1498. -- part 53 (button)
  1499. -- low flags: 00
  1500. -- high flags: 8004
  1501. -- rect: left=223 top=250 right=267 bottom=254
  1502. -- title width / last selected line: 0
  1503. -- icon id / first selected line: 0 / 0
  1504. -- text alignment: 1
  1505. -- font id: 0
  1506. -- text size: 12
  1507. -- style flags: 0
  1508. -- line height: 16
  1509. -- part name: clr
  1510. ----- HyperTalk script -----
  1511. on mouseUp
  1512.   global flag
  1513.   global prog
  1514.   if prog = 1 then
  1515.     put return & "clr" after last line of field "list" of card "PG"
  1516.   end if
  1517.   put 1 into flag
  1518.   put "" into card field "Regs"
  1519. end mouseUp
  1520.  
  1521. on mouseWithin
  1522.   get hlp("Clears all registers in the calculator stack.")
  1523. end mouseWithin
  1524.  
  1525.  
  1526.  
  1527. -- part 54 (button)
  1528. -- low flags: 00
  1529. -- high flags: 8004
  1530. -- rect: left=223 top=208 right=226 bottom=254
  1531. -- title width / last selected line: 0
  1532. -- icon id / first selected line: 0 / 0
  1533. -- text alignment: 1
  1534. -- font id: 0
  1535. -- text size: 12
  1536. -- style flags: 0
  1537. -- line height: 16
  1538. -- part name: !
  1539. ----- HyperTalk script -----
  1540. on mouseUp
  1541.   global flag
  1542.   global prog
  1543.   global error
  1544.   if prog = 1 then
  1545.     put return & "!" after last line of field "list" of card "PG"
  1546.   end if
  1547.   if line 4 of card field "Regs" <= 54 and line 4 of card field "Regs" >= 0 then
  1548.     put line 4 of card field "Regs" into temp
  1549.     put fact(temp) into line 4 of card field "Regs"
  1550.   else
  1551.     put 1 into error
  1552.     beep
  1553.   end if
  1554.   put 1 into flag
  1555. end mouseUp
  1556.  
  1557. on mouseWithin
  1558.   get hlp("Calculates factorial of x if integer, or " & "Gamma(x+1) if not.  Note that [0‚â§x‚â§54].")
  1559. end mouseWithin
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565. -- part 55 (button)
  1566. -- low flags: 00
  1567. -- high flags: 8004
  1568. -- rect: left=223 top=230 right=247 bottom=254
  1569. -- title width / last selected line: 0
  1570. -- icon id / first selected line: 0 / 0
  1571. -- text alignment: 1
  1572. -- font id: 0
  1573. -- text size: 12
  1574. -- style flags: 0
  1575. -- line height: 16
  1576. -- part name: ClM
  1577. ----- HyperTalk script -----
  1578. on mouseUp
  1579.   global prog
  1580.   global mtask
  1581.   if prog = 1 then
  1582.     put return & "ClM" after last line of field "list" of card "PG"
  1583.   end if
  1584.   put "" into card field "M1"
  1585.   put "" into card field "M2"
  1586.   put "" into card field "M3"
  1587.   put "" into card field "M4"
  1588.   put "" into card field "M0"
  1589.   put "" into card field "M9"
  1590. end mouseUp
  1591.  
  1592. on mouseWithin
  1593.   get hlp("Clears all memory registers.")
  1594. end mouseWithin
  1595.  
  1596.  
  1597.  
  1598. -- part 56 (button)
  1599. -- low flags: 00
  1600. -- high flags: 8004
  1601. -- rect: left=142 top=188 right=205 bottom=173
  1602. -- title width / last selected line: 0
  1603. -- icon id / first selected line: 0 / 0
  1604. -- text alignment: 1
  1605. -- font id: 0
  1606. -- text size: 12
  1607. -- style flags: 0
  1608. -- line height: 16
  1609. -- part name: Rcl
  1610. ----- HyperTalk script -----
  1611. on mouseUp
  1612.   global flag
  1613.   global prog
  1614.   global mtask
  1615.   put 1 into flag
  1616.   if prog = 1 then
  1617.     put return & "Rcl" after last line of field "list" of card "PG"
  1618.   end if
  1619.   put "r" into mtask
  1620. end mouseUp
  1621.  
  1622. on mouseWithin
  1623.   get hlp("Recalls value in memory n, " & "where n [1-4] is number clicked after Rcl.")
  1624. end mouseWithin
  1625.  
  1626.  
  1627. -- part 57 (button)
  1628. -- low flags: 00
  1629. -- high flags: 8004
  1630. -- rect: left=296 top=209 right=226 bottom=327
  1631. -- title width / last selected line: 0
  1632. -- icon id / first selected line: 0 / 0
  1633. -- text alignment: 1
  1634. -- font id: 0
  1635. -- text size: 12
  1636. -- style flags: 0
  1637. -- line height: 16
  1638. -- part name: Fix
  1639. ----- HyperTalk script -----
  1640. on mouseUp
  1641.   global nform, prog, running, pos
  1642.   if prog = 1 then
  1643.     put return & "Fix" after last line of field "list" of card "PG"
  1644.   end if
  1645.   if running = 0 then
  1646.     ask "Number of decimal places:" with 4
  1647.   else
  1648.     put pos + 1 into pos
  1649.     put line pos of field "list" of card "PG" into it
  1650.   end if
  1651.   if it > 18 or it < 0 then put 4 into it
  1652.   put "0." into nform
  1653.   repeat with i = 1 to it
  1654.     put "0" after last char of nform
  1655.   end repeat
  1656.   if prog = 1 then
  1657.     put return & it after last line of card field "list" of card "PG"
  1658.   end if
  1659. end mouseUp
  1660.  
  1661. on mouseWithin
  1662.   get hlp("Sets number of decimal places displayed in all registers.")
  1663. end mouseWithin
  1664.  
  1665.  
  1666.  
  1667. -- part 58 (button)
  1668. -- low flags: 00
  1669. -- high flags: 8004
  1670. -- rect: left=260 top=269 right=286 bottom=292
  1671. -- title width / last selected line: 0
  1672. -- icon id / first selected line: 0 / 0
  1673. -- text alignment: 1
  1674. -- font id: 0
  1675. -- text size: 12
  1676. -- style flags: 0
  1677. -- line height: 16
  1678. -- part name: <->
  1679. ----- HyperTalk script -----
  1680. on mouseUp
  1681.   global flag
  1682.   global prog
  1683.   if prog = 1 then
  1684.     put return & "<->" after last line of field "list" of card "PG"
  1685.   end if
  1686.   put line 4 of card field "Regs" into card field "bigreg"
  1687.   show card field "bigreg"
  1688.   put 1 into flag
  1689. end mouseUp
  1690.  
  1691. on mouseWithin
  1692.   get hlp("Puts x register into large register under calculator")
  1693. end mouseWithin
  1694.  
  1695.  
  1696.  
  1697. -- part 59 (button)
  1698. -- low flags: 00
  1699. -- high flags: 8004
  1700. -- rect: left=466 top=145 right=163 bottom=495
  1701. -- title width / last selected line: 0
  1702. -- icon id / first selected line: 0 / 0
  1703. -- text alignment: 1
  1704. -- font id: 0
  1705. -- text size: 12
  1706. -- style flags: 0
  1707. -- line height: 16
  1708. -- part name: π
  1709. ----- HyperTalk script -----
  1710. on mouseUp
  1711.   global flag
  1712.   global nform
  1713.   global prog
  1714.   if prog = 1 then
  1715.     put return & "œÄ" after last line of field "list" of card "PG"
  1716.   end if
  1717.   set numberFormat to nform
  1718.   if line 4 of card field "Regs" <> "" then pushup
  1719.   put pi into line 4 of card field "Regs"
  1720.   put 1 into flag
  1721. end mouseUp
  1722.  
  1723. on mouseWithin
  1724.   get hlp("Puts pi into the x register. Ignores decimal setting.")
  1725. end mouseWithin
  1726.  
  1727.  
  1728.  
  1729. -- part 61 (button)
  1730. -- low flags: 80
  1731. -- high flags: 0000
  1732. -- rect: left=20 top=300 right=322 bottom=38
  1733. -- title width / last selected line: 0
  1734. -- icon id / first selected line: 1015 / 1015
  1735. -- text alignment: 1
  1736. -- font id: 0
  1737. -- text size: 12
  1738. -- style flags: 0
  1739. -- line height: 16
  1740. -- part name: Set Home
  1741. ----- HyperTalk script -----
  1742. on mouseUp
  1743.   show button "RPN Calc"
  1744.   answer "Install calculator icon on the home card?" with "yes" or "no"
  1745.   if it = "yes" then
  1746.     if the userLevel < 4 then set userLevel to 4
  1747.     choose button tool
  1748.     click at loc of button "RPN Calc"
  1749.     doMenu "Copy Button"
  1750.     choose browse tool
  1751.     visual effect dissolve
  1752.     go to home
  1753.     doMenu "Paste Button"
  1754.     answer "Drag Button to location, type Cmd-Tab"
  1755.   end if
  1756.   hide button "RPN Calc"
  1757.   hide me
  1758. end mouseUp
  1759.  
  1760. on mouseWithin
  1761.   get hlp("Installs the calculator icon on the home card.")
  1762. end mouseWithin
  1763.  
  1764.  
  1765.  
  1766. -- part 62 (button)
  1767. -- low flags: 80
  1768. -- high flags: 8000
  1769. -- rect: left=5 top=255 right=300 bottom=55
  1770. -- title width / last selected line: 0
  1771. -- icon id / first selected line: 6239 / 6239
  1772. -- text alignment: 1
  1773. -- font id: 0
  1774. -- text size: 12
  1775. -- style flags: 0
  1776. -- line height: 16
  1777. -- part name: RPN Calc
  1778. ----- HyperTalk script -----
  1779. on mouseUp
  1780.   visual effect iris open
  1781.   go to stack "RPN Calculator"
  1782. end mouseUp
  1783.  
  1784.  
  1785.  
  1786.  
  1787. -- part 64 (field)
  1788. -- low flags: 81
  1789. -- high flags: 0002
  1790. -- rect: left=60 top=289 right=322 bottom=481
  1791. -- title width / last selected line: 0
  1792. -- icon id / first selected line: 0 / 0
  1793. -- text alignment: 0
  1794. -- font id: 3
  1795. -- text size: 12
  1796. -- style flags: 0
  1797. -- line height: 16
  1798. -- part name: bigreg
  1799. ----- HyperTalk script -----
  1800. on mouseUp
  1801.   hide card field bigreg
  1802. end mouseUp
  1803.  
  1804.  
  1805.  
  1806. -- part 65 (field)
  1807. -- low flags: 81
  1808. -- high flags: 0002
  1809. -- rect: left=259 top=71 right=87 bottom=441
  1810. -- title width / last selected line: 0
  1811. -- icon id / first selected line: 0 / 0
  1812. -- text alignment: 0
  1813. -- font id: 3
  1814. -- text size: 12
  1815. -- style flags: 0
  1816. -- line height: 16
  1817. -- part name: M4
  1818. ----- HyperTalk script -----
  1819. on mouseUp
  1820.   hide card field "M4"
  1821. end mouseUp
  1822.  
  1823.  
  1824.  
  1825. -- part 66 (button)
  1826. -- low flags: 00
  1827. -- high flags: 8004
  1828. -- rect: left=433 top=166 right=184 bottom=463
  1829. -- title width / last selected line: 0
  1830. -- icon id / first selected line: 0 / 0
  1831. -- text alignment: 1
  1832. -- font id: 0
  1833. -- text size: 12
  1834. -- style flags: 0
  1835. -- line height: 16
  1836. -- part name: Deg
  1837. ----- HyperTalk script -----
  1838. on mouseUp
  1839.   global tmode
  1840.   global prog
  1841.   if prog = 1 then
  1842.     put return & "Deg" after last line of field "list" of card "PG"
  1843.   end if
  1844.   put "deg" into tmode
  1845.   put "Deg" into card field DR
  1846. end mouseUp
  1847.  
  1848. on mouseWithin
  1849.   get hlp("Sets calculator to accept degree angle measure for " & "trig functions.")
  1850. end mouseWithin
  1851.  
  1852.  
  1853.  
  1854. -- part 67 (button)
  1855. -- low flags: 00
  1856. -- high flags: 8004
  1857. -- rect: left=330 top=209 right=226 bottom=360
  1858. -- title width / last selected line: 0
  1859. -- icon id / first selected line: 0 / 0
  1860. -- text alignment: 1
  1861. -- font id: 0
  1862. -- text size: 12
  1863. -- style flags: 0
  1864. -- line height: 16
  1865. -- part name: Sci
  1866. ----- HyperTalk script -----
  1867. on mouseUp
  1868.   global nform, prog, running, pos
  1869.   if prog = 1 then
  1870.     put return & "Sci" after last line of field "list" of card "PG"
  1871.   end if
  1872.   if running = 0 then
  1873.     ask "Number of decimal places:" with 4
  1874.   else
  1875.     put pos + 1 into pos
  1876.     put line pos of field "list" of card "PG" into it
  1877.   end if
  1878.   if it > 18 or it < 0 then put 4 into it
  1879.   put "0." into nform
  1880.   repeat with i = 1 to it
  1881.     put "#" after last char of nform
  1882.   end repeat
  1883.   if prog = 1 then
  1884.     put return & it after last line of card field "list" of card "PG"
  1885.   end if
  1886. end mouseUp
  1887.  
  1888. on mouseWithin
  1889.   get hlp("Sets number of decimal places displayed in registers." & "  Trailing 0's not shown.")
  1890. end mouseWithin
  1891.  
  1892.  
  1893.  
  1894. -- part 68 (button)
  1895. -- low flags: 00
  1896. -- high flags: 8004
  1897. -- rect: left=331 top=269 right=286 bottom=361
  1898. -- title width / last selected line: 0
  1899. -- icon id / first selected line: 0 / 0
  1900. -- text alignment: 1
  1901. -- font id: 0
  1902. -- text size: 12
  1903. -- style flags: 0
  1904. -- line height: 16
  1905. -- part name: B
  1906. ----- HyperTalk script -----
  1907. on mouseUp
  1908.   global prog
  1909.   if prog = 0 then
  1910.     if tolabel("B") = 1 then
  1911.       send mouseUp to button "R/S"
  1912.     else
  1913.       beep
  1914.     end if
  1915.   else
  1916.     put return & "#B" after last line of field "list" of card "PG"
  1917.   end if
  1918. end mouseUp
  1919.  
  1920. on mouseWithin
  1921.   get hlp("Starts program at first label B found in program.")
  1922. end mouseWithin
  1923.  
  1924.  
  1925.  
  1926. -- part 69 (button)
  1927. -- low flags: 00
  1928. -- high flags: 8004
  1929. -- rect: left=364 top=269 right=286 bottom=395
  1930. -- title width / last selected line: 0
  1931. -- icon id / first selected line: 0 / 0
  1932. -- text alignment: 1
  1933. -- font id: 0
  1934. -- text size: 12
  1935. -- style flags: 0
  1936. -- line height: 16
  1937. -- part name: C
  1938. ----- HyperTalk script -----
  1939. on mouseUp
  1940.   global prog
  1941.   if prog = 0 then
  1942.     if tolabel("C") = 1 then
  1943.       send mouseUp to button "R/S"
  1944.     else
  1945.       beep
  1946.     end if
  1947.   else
  1948.     put return & "#C" after last line of field "list" of card "PG"
  1949.   end if
  1950. end mouseUp
  1951.  
  1952. on mouseWithin
  1953.   get hlp("Starts program at first label C found in program.")
  1954. end mouseWithin
  1955.  
  1956.  
  1957.  
  1958. -- part 70 (button)
  1959. -- low flags: 00
  1960. -- high flags: 8004
  1961. -- rect: left=399 top=166 right=184 bottom=429
  1962. -- title width / last selected line: 0
  1963. -- icon id / first selected line: 0 / 0
  1964. -- text alignment: 1
  1965. -- font id: 0
  1966. -- text size: 12
  1967. -- style flags: 0
  1968. -- line height: 16
  1969. -- part name: Rad
  1970. ----- HyperTalk script -----
  1971. on mouseUp
  1972.   global tmode
  1973.   global prog
  1974.   if prog = 1 then
  1975.     put return & "Rad" after last line of field "list" of card "PG"
  1976.   end if
  1977.   put "rad" into tmode
  1978.   put "Rad" into card field DR
  1979. end mouseUp
  1980.  
  1981. on mouseWithin
  1982.   get hlp("Sets calculator to accept radian angle measure for " & "trig functions.")
  1983. end mouseWithin
  1984.  
  1985.  
  1986.  
  1987. -- part 71 (button)
  1988. -- low flags: 00
  1989. -- high flags: 8004
  1990. -- rect: left=364 top=230 right=247 bottom=394
  1991. -- title width / last selected line: 0
  1992. -- icon id / first selected line: 0 / 0
  1993. -- text alignment: 1
  1994. -- font id: 0
  1995. -- text size: 12
  1996. -- style flags: 0
  1997. -- line height: 16
  1998. -- part name: Lbl
  1999. ----- HyperTalk script -----
  2000. on mouseUp
  2001.   global prog
  2002.   if prog = 1 then
  2003.     ask "Label:"
  2004.     put return & "#" & it after last line of field "list" of card "PG"
  2005.   else
  2006.     beep
  2007.   end if
  2008. end mouseUp
  2009.  
  2010. on mouseWithin
  2011.   get hlp("Records a single character label in the program.")
  2012. end mouseWithin
  2013.  
  2014.  
  2015.  
  2016. -- part 72 (button)
  2017. -- low flags: 00
  2018. -- high flags: 8004
  2019. -- rect: left=433 top=250 right=268 bottom=463
  2020. -- title width / last selected line: 0
  2021. -- icon id / first selected line: 0 / 0
  2022. -- text alignment: 1
  2023. -- font id: 0
  2024. -- text size: 12
  2025. -- style flags: 0
  2026. -- line height: 16
  2027. -- part name: R/S
  2028. ----- HyperTalk script -----
  2029. on mouseUp
  2030.   global prog, pos, running, error
  2031.   put 0 into error
  2032.   if prog = 1 then
  2033.     put return & "R/S" after last line of field "list" of card "PG"
  2034.   else
  2035.     put field "list" of card "PG" into list
  2036.     put line pos of list into t
  2037.     if t = "" then
  2038.       put 0 into running
  2039.     else
  2040.       put 1 into running
  2041.       hide card field "Regs"
  2042.       send mouseUp to card field "M1"
  2043.       set the cursor to 4
  2044.     end if
  2045.     repeat until t = ""
  2046.       if t = "R/S" then
  2047.         put pos + 1 into pos
  2048.         hide card field RnInd
  2049.         finish
  2050.         exit mouseUp
  2051.       else if t = "GTo" then
  2052.         put pos + 1 into pos
  2053.         put line pos of list into it
  2054.         put first char of it into temp
  2055.         get tolabel(temp)
  2056.         put "#" into t
  2057.       else if t = "GSb" then
  2058.         put pos + 1 into pos
  2059.         put line pos of list into it
  2060.         put first char of it into temp
  2061.         get tolabel(temp)
  2062.         put pos into ret
  2063.         put "#" into t
  2064.       else if t = "Rtn" then
  2065.         put ret into pos
  2066.         put "#" into t
  2067.       end if
  2068.       if t <> "" and first char of t <> "#" then
  2069.         send mouseUp to button t
  2070.       end if
  2071.       if error = 1 then
  2072.         answer "Function Error"
  2073.         finish
  2074.         exit mouseUp
  2075.       end if
  2076.       add 1 to pos
  2077.       put line pos of list into t
  2078.     end repeat
  2079.     put 2 into pos
  2080.     finish
  2081.   end if
  2082. end mouseUp
  2083.  
  2084. on finish
  2085.   global running
  2086.   show card field "Regs"
  2087.   put 0 into running
  2088. end finish
  2089.  
  2090. on mouseWithin
  2091.   get hlp("Starts the program running at the current step," & " or stops program if recorded in program.")
  2092. end mouseWithin
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098. -- part 73 (button)
  2099. -- low flags: 00
  2100. -- high flags: 8004
  2101. -- rect: left=364 top=250 right=267 bottom=394
  2102. -- title width / last selected line: 0
  2103. -- icon id / first selected line: 0 / 0
  2104. -- text alignment: 1
  2105. -- font id: 0
  2106. -- text size: 12
  2107. -- style flags: 0
  2108. -- line height: 16
  2109. -- part name: GTo
  2110. ----- HyperTalk script -----
  2111. on mouseUp
  2112.   global pos
  2113.   global prog
  2114.   if prog = 1 then
  2115.     put return & "GTo" after last line of field "list" of card "PG"
  2116.     ask "Branch to label:"
  2117.     put return & it after last line of field "list" of card "PG"
  2118.   else
  2119.     ask "Go to label:" with "start"
  2120.     if it = "start" then put 2 into pos
  2121.     else
  2122.       put first char of it into t
  2123.       put tolabel(t) into r
  2124.     end if
  2125.   end if
  2126. end mouseUp
  2127.  
  2128. on mouseWithin
  2129.   get hlp("Puts program pointer at specified label " & "('start' of program, or single character label).")
  2130. end mouseWithin
  2131.  
  2132.  
  2133.  
  2134. -- part 74 (button)
  2135. -- low flags: 00
  2136. -- high flags: 8004
  2137. -- rect: left=296 top=230 right=248 bottom=327
  2138. -- title width / last selected line: 0
  2139. -- icon id / first selected line: 0 / 0
  2140. -- text alignment: 1
  2141. -- font id: 0
  2142. -- text size: 12
  2143. -- style flags: 0
  2144. -- line height: 16
  2145. -- part name: Trnc
  2146. ----- HyperTalk script -----
  2147. on mouseUp
  2148.   global prog
  2149.   if prog = 1 then
  2150.     put return & "Trnc" after last line of field "list" of card "PG"
  2151.   end if
  2152.   put trunc(line 4 of card field "Regs") into line 4 of card field "Regs"
  2153. end mouseUp
  2154.  
  2155. on mouseWithin
  2156.   get hlp("Truncates the value in the x register to an integer.")
  2157. end mouseWithin
  2158.  
  2159.  
  2160.  
  2161. -- part 75 (button)
  2162. -- low flags: 00
  2163. -- high flags: 8004
  2164. -- rect: left=399 top=269 right=286 bottom=429
  2165. -- title width / last selected line: 0
  2166. -- icon id / first selected line: 0 / 0
  2167. -- text alignment: 1
  2168. -- font id: 0
  2169. -- text size: 12
  2170. -- style flags: 0
  2171. -- line height: 16
  2172. -- part name: D
  2173. ----- HyperTalk script -----
  2174. on mouseUp
  2175.   global prog
  2176.   if prog = 0 then
  2177.     if tolabel("D") = 1 then
  2178.       send mouseUp to button "R/S"
  2179.     else
  2180.       beep
  2181.     end if
  2182.   else
  2183.     put return & "#D" after last line of field "list" of card "PG"
  2184.   end if
  2185. end mouseUp
  2186.  
  2187. on mouseWithin
  2188.   get hlp("Starts program at first label D found in program.")
  2189. end mouseWithin
  2190.  
  2191.  
  2192.  
  2193. -- part 76 (button)
  2194. -- low flags: 00
  2195. -- high flags: 8004
  2196. -- rect: left=399 top=230 right=247 bottom=429
  2197. -- title width / last selected line: 0
  2198. -- icon id / first selected line: 0 / 0
  2199. -- text alignment: 1
  2200. -- font id: 0
  2201. -- text size: 12
  2202. -- style flags: 0
  2203. -- line height: 16
  2204. -- part name: ClP
  2205. ----- HyperTalk script -----
  2206. on mouseUp
  2207.   global prog
  2208.   if prog = 1 then
  2209.     put "Program" into field "list" of card "PG"
  2210.   else
  2211.     beep
  2212.     answer "Put in prog mode to clear program"
  2213.   end if
  2214. end mouseUp
  2215.  
  2216. on mouseWithin
  2217.   get hlp("Clears the program memory.  " & return & "Only operates if in program mode.")
  2218. end mouseWithin
  2219.  
  2220.  
  2221.  
  2222. -- part 77 (button)
  2223. -- low flags: 00
  2224. -- high flags: 8004
  2225. -- rect: left=399 top=250 right=268 bottom=429
  2226. -- title width / last selected line: 0
  2227. -- icon id / first selected line: 0 / 0
  2228. -- text alignment: 1
  2229. -- font id: 0
  2230. -- text size: 12
  2231. -- style flags: 0
  2232. -- line height: 16
  2233. -- part name: Prg
  2234. ----- HyperTalk script -----
  2235. on mouseUp
  2236.   global prog
  2237.   if prog = 0 then
  2238.     put 1 into prog
  2239.     show card field "PrgInd"
  2240.   else
  2241.     put 0 into prog
  2242.     hide card field "PrgInd"
  2243.   end if
  2244. end mouseUp
  2245.  
  2246. on mouseWithin
  2247.   get hlp("Toggles program mode on and off. When on, " & "click on Program field to edit program.")
  2248. end mouseWithin
  2249.  
  2250.  
  2251.  
  2252. -- part 78 (button)
  2253. -- low flags: 00
  2254. -- high flags: 8004
  2255. -- rect: left=330 top=230 right=248 bottom=360
  2256. -- title width / last selected line: 0
  2257. -- icon id / first selected line: 0 / 0
  2258. -- text alignment: 1
  2259. -- font id: 0
  2260. -- text size: 12
  2261. -- style flags: 0
  2262. -- line height: 16
  2263. -- part name: Rnd
  2264. ----- HyperTalk script -----
  2265. on mouseUp
  2266.   global prog
  2267.   if prog = 1 then
  2268.     put return & "Rnd" after last line of field "list" of card "PG"
  2269.   end if
  2270.   put round(line 4 of card field Regs) into line 4 of card field Regs
  2271. end mouseUp
  2272.  
  2273. on mouseWithin
  2274.   get hlp("Rounds the value in the x register to an integer.")
  2275. end mouseWithin
  2276.  
  2277.  
  2278.  
  2279. -- part 79 (button)
  2280. -- low flags: 00
  2281. -- high flags: 8004
  2282. -- rect: left=433 top=230 right=247 bottom=463
  2283. -- title width / last selected line: 0
  2284. -- icon id / first selected line: 0 / 0
  2285. -- text alignment: 1
  2286. -- font id: 0
  2287. -- text size: 12
  2288. -- style flags: 0
  2289. -- line height: 16
  2290. -- part name: SSt
  2291. ----- HyperTalk script -----
  2292. on mouseUp
  2293.   global prog
  2294.   global pos
  2295.   global running
  2296.   global error
  2297.   put 0 into error
  2298.   if prog = 1 then
  2299.     beep
  2300.     exit mouseUp
  2301.   end if
  2302.   put line pos of field "list" of card "PG" into t
  2303.   if t = "" then
  2304.     put 0 into running
  2305.   else
  2306.     put 1 into running
  2307.     show card field "RnInd"
  2308.     put t into card field bigreg
  2309.     show card field "bigreg"
  2310.   end if
  2311.   if t = "R/S" then
  2312.     put pos + 1 into pos
  2313.     hide card field RnInd
  2314.     finish
  2315.     exit mouseUp
  2316.   end if
  2317.   if t = "GTo" or t = "GSb" then
  2318.     put pos + 1 into pos
  2319.     put line pos of field "list" of card "PG" into it
  2320.     put it into t
  2321.     put second char of first word in it into temp
  2322.     put tolabel(temp) into r
  2323.     put pos + 1 into pos
  2324.     put t into line 2 of card field "bigreg"
  2325.     put pos into ret
  2326.     finish
  2327.     exit mouseUp
  2328.   end if
  2329.   if t = "Rtn" then
  2330.     put ret into pos
  2331.     finish
  2332.     exit mouseUp
  2333.   end if
  2334.   if t <> "" and first char of t <> "#" then
  2335.     send mouseUp to button t
  2336.   end if
  2337.   if error = 1 then
  2338.     answer "Function Error"
  2339.     finish
  2340.     exit mouseUp
  2341.   end if
  2342.   put pos + 1 into pos
  2343.   finish
  2344. end mouseUp
  2345. on finish
  2346.   hide card field RnInd
  2347.   put 0 into running
  2348. end finish
  2349.  
  2350. on mouseWithin
  2351.   get hlp("Runs the program one step for each click." & " Operation is shown in register under calculator.")
  2352. end mouseWithin
  2353.  
  2354.  
  2355.  
  2356.  
  2357. -- part 80 (button)
  2358. -- low flags: 00
  2359. -- high flags: 8004
  2360. -- rect: left=297 top=269 right=286 bottom=328
  2361. -- title width / last selected line: 0
  2362. -- icon id / first selected line: 0 / 0
  2363. -- text alignment: 1
  2364. -- font id: 0
  2365. -- text size: 12
  2366. -- style flags: 0
  2367. -- line height: 16
  2368. -- part name: A
  2369. ----- HyperTalk script -----
  2370. on mouseUp
  2371.   global prog
  2372.   if prog = 0 then
  2373.     if tolabel("A") = 1 then
  2374.       send mouseUp to button "R/S"
  2375.     else
  2376.       beep
  2377.     end if
  2378.   else
  2379.     put return & "#A" after last line of field "list" of card "PG"
  2380.   end if
  2381. end mouseUp
  2382.  
  2383. on mouseWithin
  2384.   get hlp("Starts program at first label A found in program.")
  2385. end mouseWithin
  2386.  
  2387.  
  2388.  
  2389. -- part 81 (button)
  2390. -- low flags: 00
  2391. -- high flags: 8004
  2392. -- rect: left=331 top=250 right=267 bottom=360
  2393. -- title width / last selected line: 0
  2394. -- icon id / first selected line: 0 / 0
  2395. -- text alignment: 1
  2396. -- font id: 0
  2397. -- text size: 12
  2398. -- style flags: 0
  2399. -- line height: 16
  2400. -- part name: KBd
  2401. ----- HyperTalk script -----
  2402. on mouseUp
  2403.   check
  2404.   get the rect of card field "Regs"
  2405.   put it into c
  2406.   delete item 2 of c
  2407.   delete item 2 of c
  2408.   add 6 to item 1 of c
  2409.   subtract 10 from item 2 of c
  2410.   click at c
  2411. end mouseUp
  2412.  
  2413. on mouseWithin
  2414.   get hlp("Puts cursor in register x for keyboard number entry.")
  2415. end mouseWithin
  2416.  
  2417.  
  2418.  
  2419. -- part 83 (field)
  2420. -- low flags: 01
  2421. -- high flags: 0002
  2422. -- rect: left=466 top=84 right=101 bottom=495
  2423. -- title width / last selected line: 0
  2424. -- icon id / first selected line: 0 / 0
  2425. -- text alignment: 0
  2426. -- font id: 3
  2427. -- text size: 12
  2428. -- style flags: 0
  2429. -- line height: 16
  2430. -- part name: DR
  2431. ----- HyperTalk script -----
  2432. on mouseWithin
  2433.   get hlp("[Deg] = degree mode" & return & "[Rad] = radian mode.")
  2434. end mouseWithin
  2435.  
  2436.  
  2437.  
  2438. -- part 89 (button)
  2439. -- low flags: 00
  2440. -- high flags: 8004
  2441. -- rect: left=433 top=269 right=286 bottom=463
  2442. -- title width / last selected line: 0
  2443. -- icon id / first selected line: 0 / 0
  2444. -- text alignment: 1
  2445. -- font id: 0
  2446. -- text size: 12
  2447. -- style flags: 0
  2448. -- line height: 16
  2449. -- part name: E
  2450. ----- HyperTalk script -----
  2451. on mouseUp
  2452.   global prog
  2453.   if prog = 0 then
  2454.     if tolabel("E") = 1 then
  2455.       send mouseUp to button "R/S"
  2456.     else
  2457.       beep
  2458.     end if
  2459.   else
  2460.     put return & "#E" after last line of field "list" of card "PG"
  2461.   end if
  2462. end mouseUp
  2463.  
  2464. on mouseWithin
  2465.   get hlp("Starts program at first label E found in program.")
  2466. end mouseWithin
  2467.  
  2468.  
  2469.  
  2470. -- part 90 (button)
  2471. -- low flags: 00
  2472. -- high flags: 8004
  2473. -- rect: left=260 top=166 right=184 bottom=291
  2474. -- title width / last selected line: 0
  2475. -- icon id / first selected line: 0 / 0
  2476. -- text alignment: 1
  2477. -- font id: 0
  2478. -- text size: 12
  2479. -- style flags: 0
  2480. -- line height: 16
  2481. -- part name: x=0
  2482. ----- HyperTalk script -----
  2483. on mouseUp
  2484.   global prog
  2485.   global invflg
  2486.   if prog = 1 then
  2487.     put return & "x=0" after last line of field "list" of card "PG"
  2488.   else
  2489.     if invflg = 0 then
  2490.       if line 4 of card field "Regs" <> 0 then
  2491.         passby
  2492.       end if
  2493.     else
  2494.       if line 4 of card field "Regs" = 0 then
  2495.         passby
  2496.       end if
  2497.     end if
  2498.   end if
  2499.   put 0 into invflg
  2500.   hide button "I"
  2501. end mouseUp
  2502.  
  2503. on mouseWithin
  2504.   get hlp("Tests for x=0 within a program, or x‚â†0 if inv flag set.")
  2505. end mouseWithin
  2506.  
  2507.  
  2508. -- part 91 (button)
  2509. -- low flags: 00
  2510. -- high flags: 8004
  2511. -- rect: left=295 top=166 right=184 bottom=327
  2512. -- title width / last selected line: 0
  2513. -- icon id / first selected line: 0 / 0
  2514. -- text alignment: 1
  2515. -- font id: 0
  2516. -- text size: 12
  2517. -- style flags: 0
  2518. -- line height: 16
  2519. -- part name: x>0
  2520. ----- HyperTalk script -----
  2521. on mouseUp
  2522.   global prog
  2523.   global invflg
  2524.   if prog = 1 then
  2525.     put return & "x>0" after last line of field "list" of card "PG"
  2526.   else
  2527.     if invflg = 0 then
  2528.       if line 4 of card field "Regs" <= 0 then
  2529.         passby
  2530.       end if
  2531.     else
  2532.       if line 4 of card field "Regs" > 0 then
  2533.         passby
  2534.       end if
  2535.     end if
  2536.   end if
  2537.   put 0 into invflg
  2538.   hide button "I"
  2539. end mouseUp
  2540.  
  2541. on mouseWithin
  2542.   get hlp("Tests for x>0 in program, or x‚â§0 if inv flag set.")
  2543. end mouseWithin
  2544.  
  2545.  
  2546. -- part 92 (button)
  2547. -- low flags: 00
  2548. -- high flags: 8004
  2549. -- rect: left=329 top=166 right=184 bottom=360
  2550. -- title width / last selected line: 0
  2551. -- icon id / first selected line: 0 / 0
  2552. -- text alignment: 1
  2553. -- font id: 0
  2554. -- text size: 12
  2555. -- style flags: 0
  2556. -- line height: 16
  2557. -- part name: x<0
  2558. ----- HyperTalk script -----
  2559. on mouseUp
  2560.   global prog
  2561.   global invflg
  2562.   if prog = 1 then
  2563.     put return & "x<0" after last line of field "list" of card "PG"
  2564.   else
  2565.     if invflg = 0 then
  2566.       if line 4 of card field "Regs" >= 0 then
  2567.         passby
  2568.       end if
  2569.     else
  2570.       if line 4 of card field "Regs" < 0 then
  2571.         passby
  2572.       end if
  2573.     end if
  2574.   end if
  2575.   put 0 into invflg
  2576.   hide button "I"
  2577. end mouseUp
  2578.  
  2579. on mouseWithin
  2580.   get hlp("Tests for x<0 in program, or x‚â•0 if inv flag set.")
  2581. end mouseWithin
  2582.  
  2583.  
  2584. -- part 94 (button)
  2585. -- low flags: 00
  2586. -- high flags: 8004
  2587. -- rect: left=364 top=187 right=205 bottom=394
  2588. -- title width / last selected line: 0
  2589. -- icon id / first selected line: 0 / 0
  2590. -- text alignment: 1
  2591. -- font id: 0
  2592. -- text size: 12
  2593. -- style flags: 0
  2594. -- line height: 16
  2595. -- part name: Ln1
  2596. ----- HyperTalk script -----
  2597. on mouseUp
  2598.   global flag
  2599.   global nform
  2600.   global prog
  2601.   global error
  2602.   if prog = 1 then
  2603.     put return & "Ln1" after last line of field "list" of card "PG"
  2604.   end if
  2605.   if line 4 of card field "Regs" <> "" and line 4 of card field "Regs" <> 0 then
  2606.     set numberFormat to "0.000000000000000000000000"
  2607.     put ln1(line 4 of card field "Regs") into r
  2608.     set numberFormat to nform
  2609.     put r into line 4 of card field "Regs"
  2610.   else
  2611.     put 1 into error
  2612.     beep
  2613.   end if
  2614.   put 1 into flag
  2615. end mouseUp
  2616.  
  2617. on mouseWithin
  2618.   get hlp("Natural log of 1 plus the number in x as:" & return & "ln(1+x)")
  2619. end mouseWithin
  2620.  
  2621.  
  2622.  
  2623.  
  2624. -- part 93 (button)
  2625. -- low flags: 00
  2626. -- high flags: 8004
  2627. -- rect: left=363 top=166 right=184 bottom=394
  2628. -- title width / last selected line: 0
  2629. -- icon id / first selected line: 0 / 0
  2630. -- text alignment: 1
  2631. -- font id: 0
  2632. -- text size: 12
  2633. -- style flags: 0
  2634. -- line height: 16
  2635. -- part name: x≤y
  2636. ----- HyperTalk script -----
  2637. on mouseUp
  2638.   global prog
  2639.   global invflg
  2640.   if prog = 1 then
  2641.     put return & "x‚â§y" after last line of field "list" of card "PG"
  2642.   else
  2643.     if invflg = 0 then
  2644.       if line 4 of card field "Regs" > line 3 of card field "Regs" then
  2645.         passby
  2646.       end if
  2647.     else
  2648.       if line 4 of card field "Regs" <= line 3 of card field "Regs" then
  2649.         passby
  2650.       end if
  2651.     end if
  2652.   end if
  2653.   put 0 into invflg
  2654.   hide button "I"
  2655. end mouseUp
  2656.  
  2657. on mouseWithin
  2658.   get hlp("Tests for x‚â§y in program, or x>y if inv flag set.")
  2659. end mouseWithin
  2660.  
  2661.  
  2662. -- part 95 (button)
  2663. -- low flags: 00
  2664. -- high flags: 8004
  2665. -- rect: left=399 top=187 right=205 bottom=428
  2666. -- title width / last selected line: 0
  2667. -- icon id / first selected line: 0 / 0
  2668. -- text alignment: 1
  2669. -- font id: 0
  2670. -- text size: 12
  2671. -- style flags: 0
  2672. -- line height: 16
  2673. -- part name: ex1
  2674. ----- HyperTalk script -----
  2675. on mouseUp
  2676.   global flag
  2677.   global nform
  2678.   global prog
  2679.   if prog = 1 then
  2680.     put return & "ex1" after last line of field "list" of card "PG"
  2681.   end if
  2682.   set numberFormat to "0.000000000000000000000000"
  2683.   put exp1(line 4 of card field "Regs") into r
  2684.   set numberFormat to nform
  2685.   put r into line 4 of card field "Regs"
  2686.   put 1 into flag
  2687. end mouseUp
  2688.  
  2689. on mouseWithin
  2690.   get hlp("Natural exponent of number in x minus 1:" & return & "exp(x) - 1")
  2691. end mouseWithin
  2692.  
  2693.  
  2694.  
  2695.  
  2696. -- part 96 (button)
  2697. -- low flags: 00
  2698. -- high flags: 8004
  2699. -- rect: left=466 top=166 right=183 bottom=496
  2700. -- title width / last selected line: 0
  2701. -- icon id / first selected line: 0 / 0
  2702. -- text alignment: 1
  2703. -- font id: 0
  2704. -- text size: 12
  2705. -- style flags: 0
  2706. -- line height: 16
  2707. -- part name: ann
  2708. ----- HyperTalk script -----
  2709. on mouseUp
  2710.   global flag
  2711.   global nform
  2712.   global prog
  2713.   if prog = 1 then
  2714.     put return & "ann" after last line of field "list" of card "PG"
  2715.   end if
  2716.   set numberFormat to "0.000000000000000000000000"
  2717.   put annuity(line 3 of card field "Regs",line 4 of card field "Regs") into r
  2718.   set numberFormat to nform
  2719.   put r into line 4 of card field "Regs"
  2720.   put 1 into flag
  2721. end mouseUp
  2722.  
  2723. on mouseWithin
  2724.   get hlp("Present value of one payment unit." & return & "y = periodic rate" & return & "x = no. of periods")
  2725. end mouseWithin
  2726.  
  2727.  
  2728.  
  2729.  
  2730. -- part 97 (button)
  2731. -- low flags: 00
  2732. -- high flags: 8004
  2733. -- rect: left=466 top=209 right=227 bottom=496
  2734. -- title width / last selected line: 0
  2735. -- icon id / first selected line: 0 / 0
  2736. -- text alignment: 1
  2737. -- font id: 0
  2738. -- text size: 12
  2739. -- style flags: 0
  2740. -- line height: 16
  2741. -- part name: cpd
  2742. ----- HyperTalk script -----
  2743. on mouseUp
  2744.   global flag
  2745.   global nform
  2746.   global prog
  2747.   if prog = 1 then
  2748.     put return & "cpd" after last line of field "list" of card "PG"
  2749.   end if
  2750.   set numberFormat to "0.000000000000000000000000"
  2751.   put compound(line 3 of card field "Regs",line 4 of card field "Regs") into r
  2752.   set numberFormat to nform
  2753.   put r into line 4 of card field "Regs"
  2754.   put 1 into flag
  2755. end mouseUp
  2756.  
  2757. on mouseWithin
  2758.   get hlp("Future value of one periodic payment unit." & return & "y = periodic rate" & return & "x = no. of periods")
  2759. end mouseWithin
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765. -- part 98 (button)
  2766. -- low flags: 00
  2767. -- high flags: 8004
  2768. -- rect: left=223 top=187 right=205 bottom=253
  2769. -- title width / last selected line: 0
  2770. -- icon id / first selected line: 0 / 0
  2771. -- text alignment: 1
  2772. -- font id: 0
  2773. -- text size: 12
  2774. -- style flags: 0
  2775. -- line height: 16
  2776. -- part name: mod
  2777. ----- HyperTalk script -----
  2778. on mouseUp
  2779.   global nform
  2780.   global prog
  2781.   global error
  2782.   if prog = 1 then
  2783.     put return & "mod" after last line of field "list" of card "PG"
  2784.   end if
  2785.   if line 4 of card field "Regs" <> 0 and line 4 of card field "Regs" <> "" and line 3 of card field "Regs" <> "" then
  2786.     set numberFormat to "0.000000000000000000000000"
  2787.     put line 3 of card field "Regs" mod line 4 of card field "Regs" into r
  2788.     set numberFormat to nform
  2789.     put r into line 4 of card field "Regs"
  2790.     funcdrop
  2791.   else
  2792.     put 1 into error
  2793.     beep
  2794.   end if
  2795. end mouseUp
  2796.  
  2797. on mouseWithin
  2798.   get hlp("Puts remainer after dividing y by x into x")
  2799. end mouseWithin
  2800.  
  2801.  
  2802.  
  2803.  
  2804. -- part 99 (button)
  2805. -- low flags: 00
  2806. -- high flags: 8004
  2807. -- rect: left=364 top=209 right=226 bottom=393
  2808. -- title width / last selected line: 0
  2809. -- icon id / first selected line: 0 / 0
  2810. -- text alignment: 1
  2811. -- font id: 0
  2812. -- text size: 12
  2813. -- style flags: 0
  2814. -- line height: 16
  2815. -- part name: y^x
  2816. ----- HyperTalk script -----
  2817. on mouseUp
  2818.   global nform
  2819.   global prog
  2820.   if prog = 1 then
  2821.     put return & "y^x" after last line of field "list" of card "PG"
  2822.   end if
  2823.   set numberFormat to "0.000000000000000000000000"
  2824.   if line 3 of card field "Regs" <> "" then
  2825.     put line 3 of card field "Regs" ^ line 4 of card field "Regs" into r
  2826.     set numberFormat to nform
  2827.     put r into line 4 of card field "Regs"
  2828.   else
  2829.     beep
  2830.   end if
  2831.   funcdrop
  2832. end mouseUp
  2833.  
  2834. on mouseWithin
  2835.   get hlp("Calculates y to the power in x.")
  2836. end mouseWithin
  2837.  
  2838.  
  2839. -- part 85 (field)
  2840. -- low flags: 81
  2841. -- high flags: 0002
  2842. -- rect: left=10 top=72 right=88 bottom=57
  2843. -- title width / last selected line: 0
  2844. -- icon id / first selected line: 0 / 0
  2845. -- text alignment: 0
  2846. -- font id: 3
  2847. -- text size: 9
  2848. -- style flags: 0
  2849. -- line height: 12
  2850. -- part name: PrgInd
  2851. ----- HyperTalk script -----
  2852. on mouseUp
  2853.   go to card "PG"
  2854. end mouseUp
  2855.  
  2856.  
  2857.  
  2858. -- part 100 (field)
  2859. -- low flags: 81
  2860. -- high flags: 0002
  2861. -- rect: left=10 top=116 right=133 bottom=57
  2862. -- title width / last selected line: 0
  2863. -- icon id / first selected line: 0 / 0
  2864. -- text alignment: 1
  2865. -- font id: 3
  2866. -- text size: 9
  2867. -- style flags: 0
  2868. -- line height: 12
  2869. -- part name: RnInd
  2870.  
  2871.  
  2872. -- part 111 (button)
  2873. -- low flags: 00
  2874. -- high flags: 8004
  2875. -- rect: left=260 top=250 right=267 bottom=292
  2876. -- title width / last selected line: 0
  2877. -- icon id / first selected line: 0 / 0
  2878. -- text alignment: 1
  2879. -- font id: 0
  2880. -- text size: 12
  2881. -- style flags: 0
  2882. -- line height: 16
  2883. -- part name: Cl∑
  2884. ----- HyperTalk script -----
  2885. on mouseUp
  2886.   global prog
  2887.   global flag
  2888.   global sm
  2889.   global smsq
  2890.   global cnt
  2891.   if prog = 1 then
  2892.     put return & "Cl‚àë" after last line of card field "list" of card "PG"
  2893.   end if
  2894.   put 0 into sm
  2895.   put 0 into smsq
  2896.   put 0 into cnt
  2897.   put 1 into flag
  2898. end mouseUp
  2899.  
  2900. on mouseWithin
  2901.   get hlp("Clears all statistical registers. " & return & "Use before entering any new set of data.")
  2902. end mouseWithin
  2903.  
  2904.  
  2905.  
  2906.  
  2907. -- part 101 (field)
  2908. -- low flags: 80
  2909. -- high flags: 0002
  2910. -- rect: left=64 top=294 right=312 bottom=254
  2911. -- title width / last selected line: 0
  2912. -- icon id / first selected line: 0 / 0
  2913. -- text alignment: 0
  2914. -- font id: 3
  2915. -- text size: 12
  2916. -- style flags: 0
  2917. -- line height: 16
  2918. -- part name: kbd
  2919.  
  2920.  
  2921. -- part 112 (button)
  2922. -- low flags: 00
  2923. -- high flags: 8004
  2924. -- rect: left=466 top=230 right=247 bottom=496
  2925. -- title width / last selected line: 0
  2926. -- icon id / first selected line: 0 / 0
  2927. -- text alignment: 1
  2928. -- font id: 0
  2929. -- text size: 12
  2930. -- style flags: 0
  2931. -- line height: 16
  2932. -- part name: ClL
  2933. ----- HyperTalk script -----
  2934. on mouseUp
  2935.   global prog
  2936.   global flag
  2937.   if prog = 1 then
  2938.     put return & "ClL" after last line of field "list" of card "PG"
  2939.   end if
  2940.   put "" into card field "List"
  2941.   put 1 into flag
  2942. end mouseUp
  2943.  
  2944. on mouseWithin
  2945.   get hlp("Clears list.")
  2946. end mouseWithin
  2947.  
  2948.  
  2949. -- part 113 (button)
  2950. -- low flags: 00
  2951. -- high flags: 8004
  2952. -- rect: left=297 top=250 right=267 bottom=328
  2953. -- title width / last selected line: 0
  2954. -- icon id / first selected line: 0 / 0
  2955. -- text alignment: 1
  2956. -- font id: 0
  2957. -- text size: 12
  2958. -- style flags: 0
  2959. -- line height: 16
  2960. -- part name: Abs
  2961. ----- HyperTalk script -----
  2962. on mouseUp
  2963.   global prog
  2964.   global flag
  2965.   if prog = 1 then
  2966.     put return & "Abs" after last line of field "list" of card "PG"
  2967.   end if
  2968.   put abs(line 4 of card field "Regs") into line 4 of card field "Regs"
  2969.   put 1 into flag
  2970. end mouseUp
  2971.  
  2972.  
  2973.  
  2974. -- part 114 (button)
  2975. -- low flags: 00
  2976. -- high flags: 8004
  2977. -- rect: left=399 top=209 right=226 bottom=429
  2978. -- title width / last selected line: 0
  2979. -- icon id / first selected line: 0 / 0
  2980. -- text alignment: 1
  2981. -- font id: 0
  2982. -- text size: 12
  2983. -- style flags: 0
  2984. -- line height: 16
  2985. -- part name: GSb
  2986. ----- HyperTalk script -----
  2987. on mouseUp
  2988.   global prog
  2989.   if prog = 1 then
  2990.     put return & "GSb" after last line of field "list" of card "PG"
  2991.     answer "Subroutine label:"
  2992.     put it after last line of field "list" of card "PG"
  2993.   else
  2994.     beep
  2995.   end if
  2996. end mouseUp
  2997.  
  2998. on mouseWithin
  2999.   get hlp("Branches program to sub-routine with the specified label.")
  3000. end mouseWithin
  3001.  
  3002.  
  3003.  
  3004. -- part 115 (button)
  3005. -- low flags: 00
  3006. -- high flags: 8004
  3007. -- rect: left=106 top=166 right=183 bottom=139
  3008. -- title width / last selected line: 0
  3009. -- icon id / first selected line: 0 / 0
  3010. -- text alignment: 1
  3011. -- font id: 0
  3012. -- text size: 12
  3013. -- style flags: 0
  3014. -- line height: 16
  3015. -- part name: Sh∑
  3016. ----- HyperTalk script -----
  3017. on mouseUp
  3018.   global prog
  3019.   global sm
  3020.   global smsq
  3021.   global cnt
  3022.   if prog = 1 then
  3023.     put return & "Sh‚àë" after last line of field "list" of card "PG"
  3024.   end if
  3025.   put sm into line 1 of card field "Regs"
  3026.   put smsq into line 2 of card field "Regs"
  3027. end mouseUp
  3028.  
  3029. on mouseWithin
  3030.   get hlp("t = sum" & return & "z = sum of squares" & return & "Shows above values from statistical calculations.")
  3031. end mouseWithin
  3032.  
  3033.  
  3034.  
  3035.  
  3036. -- part 116 (button)
  3037. -- low flags: 00
  3038. -- high flags: 8004
  3039. -- rect: left=71 top=166 right=183 bottom=103
  3040. -- title width / last selected line: 0
  3041. -- icon id / first selected line: 0 / 0
  3042. -- text alignment: 1
  3043. -- font id: 0
  3044. -- text size: 12
  3045. -- style flags: 0
  3046. -- line height: 16
  3047. -- part name: Stat
  3048. ----- HyperTalk script -----
  3049. on mouseUp
  3050.   global prog
  3051.   global flag
  3052.   global error
  3053.   global cnt
  3054.   global sm
  3055.   global smsq
  3056.   if prog = 1 then
  3057.     put return & "Stat" after last line of field "list" of card "PG"
  3058.   end if
  3059.   if cnt > 1 then
  3060.     put sm / cnt into m
  3061.     put m into line 4 of card field "Regs"
  3062.     put smsq / cnt - (m * m) into t
  3063.     put t * cnt / (cnt - 1) into t
  3064.     put t into line 2 of card field "Regs"
  3065.     put sqrt(t) into line 3 of card field "Regs"
  3066.   else
  3067.     put 1 into error
  3068.     beep
  3069.   end if
  3070.   put 1 into flag
  3071. end mouseUp
  3072.  
  3073. on mouseWithin
  3074.   get hlp("Single value statistics:" & return & "z = variance" & return & "y = unbiased standard dev." & return & "x = average (mean)")
  3075. end mouseWithin
  3076.  
  3077.  
  3078.  
  3079.  
  3080. -- part 117 (button)
  3081. -- low flags: 00
  3082. -- high flags: 8004
  3083. -- rect: left=71 top=145 right=162 bottom=103
  3084. -- title width / last selected line: 0
  3085. -- icon id / first selected line: 0 / 0
  3086. -- text alignment: 1
  3087. -- font id: 0
  3088. -- text size: 12
  3089. -- style flags: 0
  3090. -- line height: 16
  3091. -- part name: Py,x
  3092. ----- HyperTalk script -----
  3093. on mouseUp
  3094.   global prog
  3095.   global error
  3096.   if prog = 1 then
  3097.     put return & "Py,x" after last line of field "list" of card "PG"
  3098.   end if
  3099.   put line 3 of card field "Regs" into n
  3100.   put line 4 of card field "Regs" into r
  3101.   if n > 54 or r > 54 then
  3102.     beep
  3103.     put 1 into error
  3104.     exit mouseUp
  3105.   else
  3106.     put fact(n) / fact(n - r) into line 4 of card field "Regs"
  3107.     funcdrop
  3108.   end if
  3109. end mouseUp
  3110.  
  3111. on mouseWithin
  3112.   get hlp("Permutation of y objects taken x at a time." & return & return & "Ex: P(5,3) = 60")
  3113. end mouseWithin
  3114.  
  3115.  
  3116.  
  3117.  
  3118. -- part 118 (button)
  3119. -- low flags: 00
  3120. -- high flags: 8004
  3121. -- rect: left=106 top=145 right=162 bottom=138
  3122. -- title width / last selected line: 0
  3123. -- icon id / first selected line: 0 / 0
  3124. -- text alignment: 1
  3125. -- font id: 0
  3126. -- text size: 12
  3127. -- style flags: 0
  3128. -- line height: 16
  3129. -- part name: Cy,x
  3130. ----- HyperTalk script -----
  3131. on mouseUp
  3132.   global prog
  3133.   global error
  3134.   if prog = 1 then
  3135.     put return & "Cy,x" after last line of field "list" of card "PG"
  3136.   end if
  3137.   put line 3 of card field "Regs" into n
  3138.   put line 4 of card field "Regs" into r
  3139.   if n > 54 or r > 54 then
  3140.     beep
  3141.     put 1 into error
  3142.     exit mouseUp
  3143.   else
  3144.     put fact(n) / fact(n - r) / fact(r) into line 4 of card field "Regs"
  3145.     funcdrop
  3146.   end if
  3147. end mouseUp
  3148.  
  3149. on mouseWithin
  3150.   get hlp("Combinations of y objects taken x at a time." & return & return & "Ex: C(5,3) = 10")
  3151. end mouseWithin
  3152.  
  3153.  
  3154.  
  3155.  
  3156. -- part 119 (button)
  3157. -- low flags: 00
  3158. -- high flags: 8004
  3159. -- rect: left=141 top=145 right=162 bottom=173
  3160. -- title width / last selected line: 0
  3161. -- icon id / first selected line: 0 / 0
  3162. -- text alignment: 1
  3163. -- font id: 0
  3164. -- text size: 12
  3165. -- style flags: 256
  3166. -- line height: 16
  3167. -- part name: Δ%
  3168. ----- HyperTalk script -----
  3169. on mouseUp
  3170.   global prog
  3171.   global flag
  3172.   global error
  3173.   global nform
  3174.   if prog = 1 then
  3175.     put return & "‚àÜ%" after last line of field "list" of card "PG"
  3176.   end if
  3177.   set numberFormat to "0.000000000000000000000000"
  3178.   put line 3 of card field "Regs" into a
  3179.   put line 4 of card field "Regs" into b
  3180.   if a <> 0 and a <> "" then
  3181.     put (b - a) * 100 / a into r
  3182.     set numberFormat to nform
  3183.     put r into line 4 of card field "Regs"
  3184.   else
  3185.     put 1 into error
  3186.     beep
  3187.   end if
  3188.   put 1 into flag
  3189. end mouseUp
  3190.  
  3191. on mouseWithin
  3192.   get hlp("Percent change of x from y")
  3193. end mouseWithin
  3194.  
  3195.  
  3196.  
  3197.  
  3198. -- part 126 (field)
  3199. -- low flags: 80
  3200. -- high flags: 0007
  3201. -- rect: left=59 top=288 right=335 bottom=502
  3202. -- title width / last selected line: 0
  3203. -- icon id / first selected line: 0 / 0
  3204. -- text alignment: 0
  3205. -- font id: 3
  3206. -- text size: 12
  3207. -- style flags: 0
  3208. -- line height: 16
  3209. -- part name: LIst
  3210.  
  3211.  
  3212. -- part 120 (button)
  3213. -- low flags: 00
  3214. -- high flags: 8004
  3215. -- rect: left=433 top=209 right=226 bottom=464
  3216. -- title width / last selected line: 0
  3217. -- icon id / first selected line: 0 / 0
  3218. -- text alignment: 1
  3219. -- font id: 0
  3220. -- text size: 12
  3221. -- style flags: 0
  3222. -- line height: 16
  3223. -- part name: Rtn
  3224. ----- HyperTalk script -----
  3225. on mouseUp
  3226.   global prog
  3227.   if prog = 1 then
  3228.     put return & "Rtn" after last line of field "list" of card "PG"
  3229.   else
  3230.     beep
  3231.   end if
  3232. end mouseUp
  3233.  
  3234. on mouseWithin
  3235.   get hlp("Returns control to the step after a sub-routine was called.")
  3236. end mouseWithin
  3237.  
  3238.  
  3239.  
  3240. -- part 121 (button)
  3241. -- low flags: 00
  3242. -- high flags: 8004
  3243. -- rect: left=189 top=269 right=286 bottom=220
  3244. -- title width / last selected line: 0
  3245. -- icon id / first selected line: 0 / 0
  3246. -- text alignment: 1
  3247. -- font id: 0
  3248. -- text size: 12
  3249. -- style flags: 0
  3250. -- line height: 16
  3251. -- part name: ∑+
  3252. ----- HyperTalk script -----
  3253. on mouseUp
  3254.   global flag
  3255.   global prog
  3256.   global cnt
  3257.   global sm
  3258.   global smsq
  3259.   global invflg
  3260.   if prog = 1 then
  3261.     put return & "‚àë+" after last line of field "list" of card "PG"
  3262.   end if
  3263.   get line 4 of card field "Regs"
  3264.   if invflg = 0 then
  3265.     add it to sm
  3266.     add it * it to smsq
  3267.     add 1 to cnt
  3268.   else
  3269.     if cnt >= 1 then
  3270.       subtract it from sm
  3271.       subtract it * it from smsq
  3272.       subtract 1 from cnt
  3273.     end if
  3274.     put 0 into invflg
  3275.     hide button "I"
  3276.   end if
  3277.   put cnt into card field "bigreg"
  3278.   show card field "bigreg"
  3279.   put 1 into flag
  3280. end mouseUp
  3281.  
  3282. on mouseWithin
  3283.   get hlp("Enters x and calculates count, sum and sum of squares" & " into stat registers. [inv][‚àë+] = [‚àë-]")
  3284. end mouseWithin
  3285.  
  3286.  
  3287.  
  3288.  
  3289. -- part 122 (button)
  3290. -- low flags: 00
  3291. -- high flags: 8004
  3292. -- rect: left=466 top=250 right=267 bottom=496
  3293. -- title width / last selected line: 0
  3294. -- icon id / first selected line: 0 / 0
  3295. -- text alignment: 1
  3296. -- font id: 0
  3297. -- text size: 12
  3298. -- style flags: 0
  3299. -- line height: 16
  3300. -- part name: Lst
  3301. ----- HyperTalk script -----
  3302. on mouseUp
  3303.   global prog
  3304.   global flag
  3305.   if prog = 1 then
  3306.     put return & "Lst" after last line of field "list" of card "PG"
  3307.   else
  3308.     if the commandKey is down then
  3309.       set the visible of card field "List" to not the visible of card field "List"
  3310.     else
  3311.       if card field "List" is not empty then
  3312.         put "," & line 4 of card field "Regs" after last char of card field "List"
  3313.       else
  3314.         put line 4 of card field "Regs" after last char of card field "List"
  3315.       end if
  3316.     end if
  3317.   end if
  3318.   put 1 into flag
  3319. end mouseUp
  3320.  
  3321. on mouseWithin
  3322.   get hlp("Puts x at end of list. " & return & "With cmd_key: toggles list visibility " & "(can dbl clk & press cmd-c to copy).")
  3323. end mouseWithin
  3324.  
  3325.  
  3326. -- part 123 (button)
  3327. -- low flags: 00
  3328. -- high flags: 8003
  3329. -- rect: left=470 top=269 right=286 bottom=492
  3330. -- title width / last selected line: 0
  3331. -- icon id / first selected line: 0 / 0
  3332. -- text alignment: 1
  3333. -- font id: 0
  3334. -- text size: 12
  3335. -- style flags: 0
  3336. -- line height: 16
  3337. -- part name: 
  3338. ----- HyperTalk script -----
  3339. on mouseUp
  3340.   global prog
  3341.   put "Written in HyperTalk by C. Kingston" into card field "bigreg"
  3342.   show card field "bigreg"
  3343. end mouseUp
  3344.  
  3345. on mouseWithin
  3346.   get hlp("RPN Calculator" & return & "Version .91" & return & " ¬© 1987 by C. Kingston." & return & "     All rights reserved.")
  3347. end mouseWithin
  3348.  
  3349.  
  3350.  
  3351. -- part 124 (field)
  3352. -- low flags: 01
  3353. -- high flags: 0000
  3354. -- rect: left=115 top=46 right=62 bottom=440
  3355. -- title width / last selected line: 0
  3356. -- icon id / first selected line: 0 / 0
  3357. -- text alignment: 1
  3358. -- font id: 3
  3359. -- text size: 12
  3360. -- style flags: 0
  3361. -- line height: 16
  3362. -- part name: Name
  3363.  
  3364.  
  3365. -- part 125 (field)
  3366. -- low flags: 01
  3367. -- high flags: 0000
  3368. -- rect: left=489 top=8 right=20 bottom=501
  3369. -- title width / last selected line: 0
  3370. -- icon id / first selected line: 0 / 0
  3371. -- text alignment: 0
  3372. -- font id: 3
  3373. -- text size: 12
  3374. -- style flags: 0
  3375. -- line height: 16
  3376. -- part name: Pname
  3377.  
  3378.  
  3379. -- part 127 (button)
  3380. -- low flags: 00
  3381. -- high flags: 8000
  3382. -- rect: left=9 top=193 right=242 bottom=53
  3383. -- title width / last selected line: 0
  3384. -- icon id / first selected line: 27212 / 27212
  3385. -- text alignment: 1
  3386. -- font id: 0
  3387. -- text size: 12
  3388. -- style flags: 0
  3389. -- line height: 16
  3390. -- part name: Plot
  3391. ----- HyperTalk script -----
  3392. on mouseUp
  3393.   if card field "List" is empty then
  3394.     answer "Empty list. Plot anyway?" with "Yes" or "No"
  3395.   else
  3396.     put "Yes" into it
  3397.   end if
  3398.   if it = "Yes" then
  3399.     put card field "M0" into minx
  3400.     put card field "M9" into maxx
  3401.     push card
  3402.     put card field "List" into it
  3403.     visual effect iris open
  3404.     go to stack "Calc Plot"
  3405.     put it into field "Data"
  3406.     put minx into field "Min X"
  3407.     put maxx into field "Max X"
  3408.     click at loc of background button "Line"
  3409.   end if
  3410. end mouseUp
  3411.  
  3412. on mouseWithin
  3413.   get hlp("Goes to the plot stack and plots values in the 'List'.")
  3414. end mouseWithin
  3415.  
  3416.  
  3417.  
  3418. -- part 130 (button)
  3419. -- low flags: 80
  3420. -- high flags: 8002
  3421. -- rect: left=473 top=106 right=122 bottom=491
  3422. -- title width / last selected line: 0
  3423. -- icon id / first selected line: 0 / 0
  3424. -- text alignment: 1
  3425. -- font id: 0
  3426. -- text size: 12
  3427. -- style flags: 0
  3428. -- line height: 16
  3429. -- part name: I
  3430. ----- HyperTalk script -----
  3431. on mouseUp
  3432.   global invflg
  3433.   put 0 into invflg
  3434.   hide button "I"
  3435. end mouseUp
  3436.  
  3437. on mouseWithin
  3438.   get hlp("Visible when inverse flag is set.")
  3439. end mouseWithin
  3440.  
  3441.  
  3442.  
  3443. -- part 128 (field)
  3444. -- low flags: 01
  3445. -- high flags: 0000
  3446. -- rect: left=499 top=328 right=342 bottom=512
  3447. -- title width / last selected line: 0
  3448. -- icon id / first selected line: 0 / 0
  3449. -- text alignment: 0
  3450. -- font id: 3
  3451. -- text size: 12
  3452. -- style flags: 0
  3453. -- line height: 16
  3454. -- part name: Fixit
  3455. ----- HyperTalk script -----
  3456. on mouseUp
  3457.   if the userLevel < 5 then
  3458.     set userLevel to 5
  3459.     show menuBar
  3460.   else
  3461.     set userLevel to 2
  3462.     hide menuBar
  3463.   end if
  3464.   if the optionKey is down then
  3465.     put "" into card field "Name"
  3466.     put "" into card field "Pname"
  3467.   end if
  3468. end mouseUp
  3469.  
  3470.  
  3471.  
  3472. -- part 131 (field)
  3473. -- low flags: 81
  3474. -- high flags: 0000
  3475. -- rect: left=474 top=6 right=19 bottom=486
  3476. -- title width / last selected line: 0
  3477. -- icon id / first selected line: 0 / 0
  3478. -- text alignment: 0
  3479. -- font id: 3
  3480. -- text size: 9
  3481. -- style flags: 8704
  3482. -- line height: 12
  3483. -- part name: xtest
  3484.  
  3485.  
  3486. -- part 136 (button)
  3487. -- low flags: 00
  3488. -- high flags: 0000
  3489. -- rect: left=465 top=26 right=56 bottom=496
  3490. -- title width / last selected line: 0
  3491. -- icon id / first selected line: 25002 / 25002
  3492. -- text alignment: 1
  3493. -- font id: 0
  3494. -- text size: 12
  3495. -- style flags: 0
  3496. -- line height: 16
  3497. -- part name: Instr
  3498. ----- HyperTalk script -----
  3499. on mouseUp
  3500.   visual effect dissolve
  3501.   go to card "Index"
  3502. end mouseUp
  3503.  
  3504. on mouseWithin
  3505.   get hlp("Goes to the instruction index.")
  3506. end mouseWithin
  3507.  
  3508.  
  3509.  
  3510. -- part 137 (field)
  3511. -- low flags: 81
  3512. -- high flags: 0002
  3513. -- rect: left=70 top=323 right=335 bottom=158
  3514. -- title width / last selected line: 0
  3515. -- icon id / first selected line: 0 / 0
  3516. -- text alignment: 0
  3517. -- font id: 3
  3518. -- text size: 9
  3519. -- style flags: 0
  3520. -- line height: 12
  3521. -- part name: M0
  3522. ----- HyperTalk script -----
  3523. on mouseUp
  3524.   hide card field "M0"
  3525.   hide card field "M9"
  3526. end mouseUp
  3527.  
  3528.  
  3529.  
  3530. -- part 138 (field)
  3531. -- low flags: 81
  3532. -- high flags: 0002
  3533. -- rect: left=163 top=323 right=335 bottom=251
  3534. -- title width / last selected line: 0
  3535. -- icon id / first selected line: 0 / 0
  3536. -- text alignment: 0
  3537. -- font id: 3
  3538. -- text size: 9
  3539. -- style flags: 0
  3540. -- line height: 12
  3541. -- part name: M9
  3542. ----- HyperTalk script -----
  3543. on mouseUp
  3544.   hide card field "M0"
  3545.   hide card field "M9"
  3546. end mouseUp
  3547.  
  3548.  
  3549.  
  3550. -- part contents for card part 83
  3551. ----- text -----
  3552. Rad
  3553.  
  3554. -- part contents for card part 85
  3555. ----- text -----
  3556. Program
  3557.  
  3558. -- part contents for card part 100
  3559. ----- text -----
  3560. Running
  3561.  
  3562. -- part contents for card part 124
  3563. ----- text -----
  3564. User is: Chas. Kingston
  3565.  
  3566. -- part contents for card part 125
  3567. ----- text -----
  3568.   Kingston
  3569.  
  3570. -- part contents for card part 131
  3571. ----- text -----
  3572. 1739361614